emptyiterable ex

This commit is contained in:
Loredana Crusoveanu 2018-05-08 21:20:53 +03:00
parent b2e489ca64
commit 4e7efb1395
1 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,12 @@ public class HamcrestExamplesUnitTest {
assertThat(collection, empty());
assertThat(collection, emptyIterable());
}
@Test
public final void givenIterableIsEmpty_whenChecking_thenEmpty() {
final Iterable<String> collection = Lists.newArrayList();
assertThat(collection, emptyIterable());
}
@Test
public final void givenCollectionIsNotEmpty_whenChecking_thenNotEmpty() {