コード例 #1
0
 @Test
 public void streamFromQueue() {
   assertThat(
       LazyReact.sequentialBuilder()
           .reactInfinitely(() -> "100")
           .limit(100)
           .withQueueFactory(QueueFactories.boundedQueue(10))
           .toQueue()
           .stream()
           .collect(Collectors.toList())
           .size(),
       equalTo(100));
 }
コード例 #2
0
 @Test
 public void reactInfinitely() {
   assertThat(
       LazyReact.sequentialBuilder().reactInfinitely(() -> "100").limit(100).toList().size(),
       equalTo(100));
 }