Example #1
0
 @Test
 public void shouldHaveFamily() {
   Stream.of(MoreStatus.values())
       .forEach(
           status ->
               assertThat(status, hasFeature("family", StatusType::getFamily, notNullValue())));
 }
Example #2
0
 @Test
 public void shouldHaveReasonPhrase() {
   Stream.of(MoreStatus.values())
       .forEach(
           status ->
               assertThat(
                   status,
                   hasFeature(
                       "reason phrase", StatusType::getReasonPhrase, not(isEmptyOrNullString()))));
 }
Example #3
0
 @Test
 public void shouldBeDistinctFromStatus() {
   Stream.of(MoreStatus.values())
       .map(StatusType::getStatusCode)
       .forEach(
           code -> {
             final Status status = Status.fromStatusCode(code);
             assertThat("Duplicate code: " + code, status, is(nullValue()));
           });
 }