DATACMNS-1433 - Added additional Streamable.and(…) flavors for convenience.

Removed superfluous Streamable creation from DefaultImplementationlookupConfiguration.
This commit is contained in:
Oliver Drotbohm
2018-12-04 12:40:52 +01:00
parent 9b39f51635
commit a3a5c8e484
3 changed files with 59 additions and 1 deletions

View File

@@ -38,4 +38,19 @@ public class StreamableUnitTests {
assertThat(streamable.toList()).containsExactly(1, 2, 1);
assertThat(streamable.toSet()).containsExactlyInAnyOrder(1, 2);
}
@Test // DATACMNS-1433
public void concatenatesIterable() {
assertThat(Streamable.of(1, 2).and(Arrays.asList(3, 4))).containsExactly(1, 2, 3, 4);
}
@Test // DATACMNS-1433
public void concatenatesVarargs() {
assertThat(Streamable.of(1, 2).and(3, 4)).containsExactly(1, 2, 3, 4);
}
@Test // DATACMNS-1433
public void concatenatesStreamable() {
assertThat(Streamable.of(1, 2).and(Streamable.of(3, 4))).containsExactly(1, 2, 3, 4);
}
}