use of org.jbehave.core.junit.AnnotatedEmbedderRunner in project jbehave-core by jbehave.
the class GuiceAnnotatedEmbedderRunnerBehaviour method shouldCreateWithGuiceAnnotatedBuilder.
@Test
public void shouldCreateWithGuiceAnnotatedBuilder() throws InitializationError {
AnnotatedEmbedderRunner runner = new GuiceAnnotatedEmbedderRunner(RunningWithAnnotatedEmbedderRunner.class);
assertThat(runner.annotationBuilder(), instanceOf(GuiceAnnotationBuilder.class));
}
use of org.jbehave.core.junit.AnnotatedEmbedderRunner in project jbehave-core by jbehave.
the class WeldAnnotatedEmbedderRunnerBehaviour method shouldCreateWithGuiceAnnotatedBuilder.
@Test
public void shouldCreateWithGuiceAnnotatedBuilder() throws InitializationError {
AnnotatedEmbedderRunner runner = new WeldAnnotatedEmbedderRunner(RunningWithAnnotatedEmbedderRunner.class);
assertThat(runner.annotationBuilder(), instanceOf(WeldAnnotationBuilder.class));
}
use of org.jbehave.core.junit.AnnotatedEmbedderRunner in project jbehave-core by jbehave.
the class NeedleAnnotatedEmbedderRunnerBehaviour method shouldCreateWithGuiceAnnotatedBuilder.
@Test
public void shouldCreateWithGuiceAnnotatedBuilder() throws InitializationError {
AnnotatedEmbedderRunner runner = new NeedleAnnotatedEmbedderRunner(RunningWithAnnotatedEmbedderRunner.class);
assertThat(runner.annotationBuilder(), instanceOf(NeedleAnnotationBuilder.class));
}
use of org.jbehave.core.junit.AnnotatedEmbedderRunner in project jbehave-core by jbehave.
the class GroovyAnnotatedEmbedderRunnerBehaviour method shouldCreateWithSpringAnnotatedBuilder.
@Test
public void shouldCreateWithSpringAnnotatedBuilder() throws InitializationError {
AnnotatedEmbedderRunner runner = new GroovyAnnotatedEmbedderRunner(RunningWithAnnotatedEmbedderRunner.class);
assertThat(runner.annotationBuilder(), instanceOf(GroovyAnnotationBuilder.class));
}
use of org.jbehave.core.junit.AnnotatedEmbedderRunner in project jbehave-core by jbehave.
the class Embedder method runStoriesWithAnnotatedEmbedderRunner.
public void runStoriesWithAnnotatedEmbedderRunner(List<String> classNames) {
EmbedderClassLoader classLoader = classLoader();
for (String className : classNames) {
embedderMonitor.runningWithAnnotatedEmbedderRunner(className);
AnnotatedEmbedderRunner runner = AnnotatedEmbedderUtils.annotatedEmbedderRunner(className, classLoader);
try {
Object annotatedInstance = runner.createTest();
if (annotatedInstance instanceof Embeddable) {
((Embeddable) annotatedInstance).run();
} else {
embedderMonitor.annotatedInstanceNotOfType(annotatedInstance, Embeddable.class);
}
} catch (Throwable e) {
throw new AnnotatedEmbedderRunFailed(runner, e);
}
}
}
Aggregations