Пример #1
0
 @Test
 public void shouldHaveFamily() {
   Stream.of(MoreStatus.values())
       .forEach(
           status ->
               assertThat(status, hasFeature("family", StatusType::getFamily, notNullValue())));
 }
Пример #2
0
 @Test
 public void shouldHaveReasonPhrase() {
   Stream.of(MoreStatus.values())
       .forEach(
           status ->
               assertThat(
                   status,
                   hasFeature(
                       "reason phrase", StatusType::getReasonPhrase, not(isEmptyOrNullString()))));
 }
Пример #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()));
           });
 }