Skip to content

Commit

Permalink
chore: Add collect operator test for stream javadsl. (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
He-Pin authored Jan 16, 2024
1 parent 7c82c2a commit d313eef
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,20 @@ public void apply(String elem) {
probe.expectMsgEquals("2C");
}

@Test
public void mustBeAbleToUseCollect() {
Source.from(Arrays.asList(1, 2, 3, 4, 5))
.collect(
PFBuilder.<Integer, Integer>create()
.match(Integer.class, elem -> elem % 2 != 0, elem -> elem)
.build())
.runWith(TestSink.create(system), system)
.ensureSubscription()
.request(5)
.expectNext(1, 3, 5)
.expectComplete();
}

@Test
public void mustBeAbleToUseCollectType() throws Exception {
final TestKit probe = new TestKit(system);
Expand Down

0 comments on commit d313eef

Please sign in to comment.