The most common partition-case, as divertTo(Mat) #24388

This commit is contained in:
Viktor Klang (√) 2018-01-22 19:17:41 +01:00 committed by Johan Andrén
parent 6264f8ea70
commit e999d03e8b
11 changed files with 174 additions and 1 deletions

View file

@ -860,4 +860,16 @@ public class SourceTest extends StreamTest {
assertEquals((Object) 0, result);
}
@Test
public void mustBeAbleToUseAlsoTo() {
final Source<Integer, NotUsed> f = Source.<Integer>empty().alsoTo(Sink.ignore());
final Source<Integer, String> f2 = Source.<Integer>empty().alsoToMat(Sink.ignore(), (i, n) -> "foo");
}
@Test
public void mustBeAbleToUseDivertTo() {
final Source<Integer, NotUsed> f = Source.<Integer>empty().divertTo(Sink.ignore(), e -> true);
final Source<Integer, String> f2 = Source.<Integer>empty().divertToMat(Sink.ignore(), e -> true, (i, n) -> "foo");
}
}