The most common partition-case, as divertTo(Mat) #24388
This commit is contained in:
parent
6264f8ea70
commit
e999d03e8b
11 changed files with 174 additions and 1 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue