public void feature_with_one_FULL_SUCCESS_scenario() {
final AtomicBoolean givenStepVisitedFlag = new AtomicBoolean(false);
final AtomicBoolean whenStepVisitedFlag = new AtomicBoolean(false);
final AtomicBoolean thenStepVisitedFlag = new AtomicBoolean(false);
final MByHaveSpec spec = new MByHaveSpec() {{
Feature("this is a feature in the runner",
Scenario("this is a scenario",
given("something", this::givenStepImplementation),
when ("something happens", this::whenStepImplementation),
then ("something should be in some state", this::thenStepImplementation)
));
}
void givenStepImplementation() { givenStepVisitedFlag.set(true); }
void whenStepImplementation() { whenStepVisitedFlag.set(true); }
void thenStepImplementation() { thenStepVisitedFlag.set(true); }
};
assertFalse(givenStepVisitedFlag.get() || whenStepVisitedFlag.get() || thenStepVisitedFlag.get());
final SpecOutput output = spec.execute();
assertTrue(givenStepVisitedFlag.get() && whenStepVisitedFlag.get() && thenStepVisitedFlag.get());
assertEquals(SpecResult.Success, output.getResult());
}