@Test public void reportsThatProbeIsSatisfiedIfSatisfied() { final Element element = context.mock(Element.class); context.checking( new Expectations() { { oneOf(probeCreator).createFor(element); will(returnValue(probe)); oneOf(probe).doProbe(); oneOf(probe).isSatisfied(); will(returnValue(true)); } }); operator.doWith(element); assertThat(operator.isProbeSatisfied(), is(true)); }
@Test public void reportsThatProbeIsNotSatisfiedIfNotRun() { assertThat(operator.isProbeSatisfied(), is(false)); }