ensureThat(result, eq(false));
}
public void shouldCopyOutcomeWithExpectationsAfterLastGiven() throws Exception {
// given
final Mock given1 = mock(Given.class, "given1");
final Mock given2 = mock(Given.class, "given2");
final Mock event = mock(Event.class, "event");
final Mock outcome = mock(OutcomeWithExpectations.class, "outcome");
World world = (World)stub(World.class);
Scenario scenario = new MultiStepScenario() {
public void specifySteps() {
given((Given) given1);
given((Given) given2);
when((Event) event);
then((Outcome) outcome);
}
};
scenario.specify();
// expect
given1.expects("setUp").with(world);
given2.expects("setUp").with(world).after(given1, "setUp");
outcome.expects("setExpectationsIn").with(world).after(given2, "setUp");
event.expects("occurIn").with(world).after(outcome, "setExpectationsIn");
outcome.expects("verify").with(world).after(event, "occurIn");
// when
scenario.run(world);
// then