Guest User

Untitled

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