Last active
August 29, 2015 13:58
-
-
Save minisu/9972220 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void accessingNonExistentTest_should_fail() | |
{ | |
asList( "", "/assets", "/live-tabular-stats" ) | |
.forEach( this::assertPathYields404 ); | |
} | |
private void assertPathYields404( String path ) | |
{ | |
ClientResponse response = R.client().resource( ENDPOINT + "/"+ nonExistentId + path ) | |
.get( ClientResponse.class ); | |
assertThat( response.getStatus(), is( NOT_FOUND_404 ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment