Adding preMaterialize operator for Source #23894 (#24497)

This commit is contained in:
Stefano Bonetti 2018-02-21 06:06:01 +00:00 committed by Konrad `ktoso` Malawski
parent e44fafd4b7
commit 3ea59b1e76
7 changed files with 135 additions and 4 deletions

View file

@ -884,4 +884,9 @@ public class SourceTest extends StreamTest {
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");
}
@Test
public void mustBeAbleToUsePreMaterialize() {
final Pair<NotUsed, Source<Integer, NotUsed>> p = Source.<Integer>empty().preMaterialize(materializer);
}
}