use of org.jbehave.core.embedder.EmbedderControls in project jbehave-core by jbehave.
the class AnnotationBuilderBehaviour method shouldBuildEmbedderWithAnnotatedControls.
@Test
public void shouldBuildEmbedderWithAnnotatedControls() {
AnnotationBuilder annotated = new AnnotationBuilder(AnnotedEmbedderControls.class);
EmbedderControls embedderControls = annotated.buildEmbedder().embedderControls();
assertThat(embedderControls.batch(), is(true));
assertThat(embedderControls.generateViewAfterStories(), is(true));
assertThat(embedderControls.ignoreFailureInStories(), is(true));
assertThat(embedderControls.ignoreFailureInView(), is(true));
assertThat(embedderControls.skip(), is(true));
assertThat(embedderControls.storyTimeouts(), equalTo("**/longs/*.story:60,**/shorts/*.story:10"));
assertThat(embedderControls.failOnStoryTimeout(), is(true));
assertThat(embedderControls.threads(), equalTo(2));
assertThat(embedderControls.verboseFailures(), is(true));
assertThat(embedderControls.verboseFiltering(), is(true));
}
use of org.jbehave.core.embedder.EmbedderControls in project jbehave-core by jbehave.
the class EmbedderMojoBehaviour method shouldCreateNewEmbedderWithGivenControls.
@Test
public void shouldCreateNewEmbedderWithGivenControls() {
// Given
AbstractEmbedderMojo mojo = new AbstractEmbedderMojo() {
public void execute() throws MojoExecutionException, MojoFailureException {
}
};
// When
mojo.batch = true;
mojo.generateViewAfterStories = false;
mojo.ignoreFailureInStories = true;
mojo.ignoreFailureInView = true;
mojo.skip = true;
mojo.storyTimeouts = "**/longs/BddTest2Long.feature:7";
mojo.failOnStoryTimeout = true;
mojo.threads = 2;
Embedder embedder = mojo.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.skip(), is(true));
assertThat(embedderControls.storyTimeouts(), is("**/longs/BddTest2Long.feature:7"));
assertThat(embedderControls.threads(), is(2));
}
use of org.jbehave.core.embedder.EmbedderControls 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));
}
Aggregations