use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class ReportStepdocsAsEmbeddables method execute.
public void execute() throws BuildException {
Embedder embedder = newEmbedder();
log("Reporting stepdocs as embeddables using embedder " + embedder, MSG_INFO);
embedder.reportStepdocsAsEmbeddables(classNames());
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class RunStoriesAsPaths method execute.
public void execute() throws BuildException {
Embedder embedder = newEmbedder();
log("Running stories as paths using embedder " + embedder, MSG_INFO);
embedder.runStoriesAsPaths(storyPaths());
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class EmbedderTaskBehaviour method shouldAllowSpecificationOfInjectableEmbedderClass.
@Test
public void shouldAllowSpecificationOfInjectableEmbedderClass() {
// Given
AbstractEmbedderTask task = new AbstractEmbedderTask() {
};
// When
task.setInjectableEmbedderClass(MyInjectableEmbedder.class.getName());
Embedder embedder = task.newEmbedder();
// Then
assertThat(embedder.getClass().getName(), equalTo(MyEmbedder.class.getName()));
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class EmbedderTaskBehaviour method shouldCreateNewEmbedderWithGivenControls.
@Test
public void shouldCreateNewEmbedderWithGivenControls() {
// Given
AbstractEmbedderTask task = new AbstractEmbedderTask() {
};
// When
task.setBatch(true);
task.setGenerateViewAfterStories(false);
task.setIgnoreFailureInStories(true);
task.setIgnoreFailureInView(true);
task.setVerboseFailures(true);
task.setVerboseFiltering(true);
task.setSkip(true);
task.setStoryTimeouts("**/shorts/BddShortTest.story:5");
task.setFailOnStoryTimeout(true);
task.setThreads(2);
Embedder embedder = task.newEmbedder();
// Then
EmbedderControls embedderControls = embedder.embedderControls();
assertThat(embedderControls.batch(), is(true));
assertThat(embedderControls.generateViewAfterStories(), is(false));
assertThat(embedderControls.ignoreFailureInStories(), is(true));
assertThat(embedderControls.ignoreFailureInView(), is(true));
assertThat(embedderControls.verboseFailures(), is(true));
assertThat(embedderControls.verboseFiltering(), is(true));
assertThat(embedderControls.skip(), is(true));
assertThat(embedderControls.storyTimeouts(), equalTo("**/shorts/BddShortTest.story:5"));
assertThat(embedderControls.failOnStoryTimeout(), is(true));
assertThat(embedderControls.threads(), equalTo(2));
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class CoreStoryRunner method runURLLoadedStoriesAsJUnit.
@Test
public void runURLLoadedStoriesAsJUnit() {
// Embedder defines the configuration and candidate steps
Embedder embedder = new URLCoreEmbedder();
String codeLocation = codeLocationFromClass(this.getClass()).getFile();
List<String> storyPaths = new StoryFinder().findPaths(codeLocation, asList("**/trader_is_alerted_of_status.story", "**/traders_can_be_searched.story"), null, "file:" + codeLocation);
embedder.runStoriesAsPaths(storyPaths);
}
Aggregations