예제 #1
0
  @Test
  public void exitNegationShouldBeProperlyDispatched() {
    final Negation data = RequirementSamples.negation();

    context.checking(
        new Expectations() {
          {
            oneOf(listenerA).exit(data);
            oneOf(listenerB).exit(data);
          }
        });

    dispatch.exit(data);

    context.assertIsSatisfied();
  }
예제 #2
0
  @Test
  public void enterRequireShouldBeProperlyDispatched() {
    final Require data = RequirementSamples.require();

    context.checking(
        new Expectations() {
          {
            oneOf(listenerA).enter(data);
            oneOf(listenerB).enter(data);
          }
        });

    dispatch.enter(data);

    context.assertIsSatisfied();
  }