use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class MapStoriesAsEmbeddables method execute.
public void execute() throws MojoExecutionException, MojoFailureException {
Embedder embedder = newEmbedder();
getLog().info("Mapping stories as embeddables using embedder " + embedder);
try {
embedder.runAsEmbeddables(classNames());
} catch (RuntimeException e) {
throw new MojoFailureException("Failed to map stories as embeddables", e);
}
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class MapStoriesAsPaths method execute.
public void execute() throws MojoExecutionException, MojoFailureException {
Embedder embedder = newEmbedder();
getLog().info("Mapping stories as paths using embedder " + embedder);
try {
embedder.mapStoriesAsPaths(storyPaths());
} catch (RuntimeException e) {
throw new MojoFailureException("Failed to map stories as paths", e);
}
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class ReportStepdocs method execute.
public void execute() throws MojoExecutionException, MojoFailureException {
Embedder embedder = newEmbedder();
getLog().info("Reporting stepdocs using embedder " + embedder);
try {
embedder.reportStepdocs();
} catch (RuntimeException e) {
throw new MojoFailureException("Failed to report stepdocs", e);
}
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class EmbedderMojoBehaviour method shouldCreateNewEmbedderWithDefaultControls.
@Test
public void shouldCreateNewEmbedderWithDefaultControls() {
// Given
AbstractEmbedderMojo mojo = new AbstractEmbedderMojo() {
public void execute() throws MojoExecutionException, MojoFailureException {
}
};
// When
Embedder embedder = mojo.newEmbedder();
// Then
EmbedderControls embedderControls = embedder.embedderControls();
assertThat(embedderControls.batch(), is(false));
assertThat(embedderControls.generateViewAfterStories(), is(true));
assertThat(embedderControls.ignoreFailureInStories(), is(false));
assertThat(embedderControls.ignoreFailureInView(), is(false));
assertThat(embedderControls.threads(), is(1));
assertThat(embedderControls.skip(), is(false));
assertThat(embedderControls.storyTimeouts(), equalTo("300"));
assertThat(embedderControls.failOnStoryTimeout(), is(false));
assertThat(embedderControls.threads(), equalTo(1));
}
use of org.jbehave.core.embedder.Embedder in project jbehave-core by jbehave.
the class EmbedderMojoBehaviour method shouldCreateNewEmbedderWithExecutors.
@Test
public void shouldCreateNewEmbedderWithExecutors() {
// Given
AbstractEmbedderMojo mojo = new AbstractEmbedderMojo() {
public void execute() throws MojoExecutionException, MojoFailureException {
}
};
// When
mojo.executorsClass = MyExecutors.class.getName();
Embedder embedder = mojo.newEmbedder();
// Then
assertThat(embedder.executorService(), sameInstance(EXECUTOR_SERVICE));
}
Aggregations