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