protected World createWorld() {
return new HashMapWorld();
}
private ScenarioResult runScenario(World world, Class storyClass, Scenario scenario) {
ScenarioResult result;
String storyDescription = new CamelCaseConverter(storyClass).toPhrase();
String description = new CamelCaseConverter(scenario).toPhrase();
try {
scenario.run(world);
result = new ScenarioResult(description, storyDescription,
scenario.containsMocks() ? ScenarioResult.USED_MOCKS : ScenarioResult.SUCCEEDED);
} catch (VerificationException ve) {
result = new ScenarioResult(description, storyDescription, ve);
} finally {
scenario.cleanUp(world);
}
return result;
}