inLeft.pipeInput(recordOf("A", 3));
- assertThat(outcome()).containsExactlyInAnyOrder();
+ assertThatOutcomeIs();
inRight.pipeInput(recordOf("a", 4));
- assertThat(outcome()).containsExactlyInAnyOrder("A-a");
+ assertThatOutcomeIs("A-a");
inLeft.pipeInput(recordOf("B", 5));
- assertThat(outcome()).containsExactlyInAnyOrder("B-a");
+ assertThatOutcomeIs("B-a");
inRight.pipeInput(recordOf("b", 6));
- assertThat(outcome()).containsExactlyInAnyOrder("A-b", "B-b");
+ assertThatOutcomeIs("A-b", "B-b");
inLeft.pipeInput(recordOf("C", 9));
- assertThat(outcome()).containsExactlyInAnyOrder("C-a", "C-b");
+ assertThatOutcomeIs("C-a", "C-b");
inRight.pipeInput(recordOf("c", 10));
- assertThat(outcome()).containsExactlyInAnyOrder("A-c", "B-c", "C-c");
+ assertThatOutcomeIs("A-c", "B-c", "C-c");
inRight.pipeInput(recordOf("d", 14));
- assertThat(outcome()).containsExactlyInAnyOrder("B-d", "C-d"); // !
+ assertThatOutcomeIs("B-d", "C-d"); // !
inLeft.pipeInput(recordOf("D", 15));
- assertThat(outcome()).containsExactlyInAnyOrder("D-b", "D-c", "D-d");
+ assertThatOutcomeIs("D-b", "D-c", "D-d");
inLeft.pipeInput(recordOf("E", 40));
- assertThat(outcome()).containsExactlyInAnyOrder();
+ assertThatOutcomeIs();
inLeft.pipeInput(recordOf("F", 60));
- assertThat(outcome()).containsExactlyInAnyOrder();
+ assertThatOutcomeIs();
inLeft.pipeInput(recordOf("G", 100));
- assertThat(outcome()).containsExactlyInAnyOrder();
+ assertThatOutcomeIs();
}
return new TestRecord<>("foo", value, T.plusSeconds(second));
}
+ void assertThatOutcomeIs(String... expected)
+ {
+ assertThat(outcome()).containsExactlyInAnyOrder(expected);
+ }
+
Stream<String> outcome()
{
return outJoined