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

@ -932,9 +932,22 @@ public class FlowTest extends StreamTest {
}
@Test
public void mustSuitablyOverrideAttributeHandlingMethods() {
@SuppressWarnings("unused")
final Flow<Integer, Integer, NotUsed> f =
Flow.of(Integer.class).withAttributes(Attributes.name("")).addAttributes(Attributes.asyncBoundary()).named("");
}
@Test
public void mustBeAbleToUseAlsoTo() {
final Flow<Integer, Integer, NotUsed> f = Flow.of(Integer.class).alsoTo(Sink.ignore());
final Flow<Integer, Integer, String> f2 = Flow.of(Integer.class).alsoToMat(Sink.ignore(), (i, n) -> "foo");
}
@Test
public void mustBeAbleToUseDivertTo() {
final Flow<Integer, Integer, NotUsed> f = Flow.of(Integer.class).divertTo(Sink.ignore(), e -> true);
final Flow<Integer, Integer, String> f2 = Flow.of(Integer.class).divertToMat(Sink.ignore(), e -> true, (i, n) -> "foo");
}
}