org.jbehave.core.Embeddable Java Examples
The following examples show how to use
org.jbehave.core.Embeddable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Stories.java From attic-rave with Apache License 2.0 | 6 votes |
@Override public Configuration configuration() { Class<? extends Embeddable> embeddableClass = this.getClass(); // Start from default ParameterConverters instance ParameterConverters parameterConverters = new ParameterConverters(); // factory to allow parameter conversion and loading from external resources (used by StoryParser too) ExamplesTableFactory examplesTableFactory = new ExamplesTableFactory(new LocalizedKeywords(), new LoadFromClasspath(embeddableClass), parameterConverters); // add custom converters parameterConverters.addConverters( new DateConverter(new SimpleDateFormat("yyyy-MM-dd")), new ParameterConverters.EnumConverter() ); return new MostUsefulConfiguration() .useStoryLoader(new LoadFromClasspath(embeddableClass)) .useStoryParser(new RegexStoryParser(examplesTableFactory)) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass)) .withDefaultFormats() .withFormats(CONSOLE, TXT, HTML, XML)) .useParameterConverters(parameterConverters); }
Example #2
Source File: LogSearchUIStories.java From ambari-logsearch with Apache License 2.0 | 5 votes |
@Override public Configuration configuration() { Class<? extends Embeddable> embeddableClass = this.getClass(); return new SeleniumConfiguration() .useSeleniumContext(context) .useWebDriverProvider(driverProvider) .useStoryLoader(LogSearchStoryLocator.getStoryLoader(UI_STORIES_LOCATION_PROPERTY, this.getClass())) .useStoryReporterBuilder(new StoryReporterBuilder() .withCodeLocation(codeLocationFromClass(embeddableClass)) .withDefaultFormats() .withFormats(CONSOLE, TXT, HTML, XML)); }
Example #3
Source File: JBehaveTest.java From Test-Driven-Java-Development-Second-Edition with MIT License | 4 votes |
@Override protected String resolveDirectory( Class<? extends Embeddable> embeddableClass) { return "bdd/jbehave/stories"; }
Example #4
Source File: JBehaveTest.java From Test-Driven-Java-Development-Second-Edition with MIT License | 4 votes |
@Override protected String resolveName(Class<? extends Embeddable> embeddableClass) { return "wikipediaSearch"; }