Guest User

Untitled

a guest
Nov 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. @Test
  2. public void getTopLevelJSON() {
  3. ClientResponse clientResponse = resource().path("/")
  4. .accept(MediaType.APPLICATION_JSON)
  5. .get(ClientResponse.class);
  6. assertThat(clientResponse.getClientResponseStatus(), is(ClientResponse.Status.OK));
  7. assertThat(clientResponse.getType().toString(), is(MediaType.APPLICATION_JSON));
  8.  
  9.  
  10. @Test
  11. public void getTopLevelXML() {
  12. ClientResponse clientResponse = resource().path("/")
  13. .accept(MediaType.APPLICATION_XML)
  14. .get(ClientResponse.class);
  15. assertThat(clientResponse.getClientResponseStatus(), is(ClientResponse.Status.OK));
  16. assertThat(clientResponse.getType().toString(), is(MediaType.APPLICATION_XML));
  17.  
  18. }
Add Comment
Please, Sign In to add comment