use of org.llorllale.cactoos.matchers.Satisfies in project cactoos by yegor256.
the class BiProcOfTest method worksWithTwoProcs.
@Test
void worksWithTwoProcs() throws Exception {
final AtomicInteger fst = new AtomicInteger();
final AtomicInteger snd = new AtomicInteger();
new Assertion<>("Must execute BiProc with two Procs", new BiProcOf<>(AtomicInteger::incrementAndGet, AtomicInteger::incrementAndGet), new Satisfies<>(proc -> {
proc.exec(fst, snd);
return fst.get() == 1 && snd.get() == 1;
})).affirm();
}
Aggregations