Skip to content

Commit 4e7efb1

Browse files
committed
emptyiterable ex
1 parent b2e489c commit 4e7efb1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

guava/src/test/java/org/baeldung/hamcrest/HamcrestExamplesUnitTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ public final void givenCollectionIsEmpty_whenChecking_thenEmpty() {
5959
assertThat(collection, empty());
6060
assertThat(collection, emptyIterable());
6161
}
62+
63+
@Test
64+
public final void givenIterableIsEmpty_whenChecking_thenEmpty() {
65+
final Iterable<String> collection = Lists.newArrayList();
66+
assertThat(collection, emptyIterable());
67+
}
6268

6369
@Test
6470
public final void givenCollectionIsNotEmpty_whenChecking_thenNotEmpty() {

0 commit comments

Comments
 (0)