Search in sources :

Example 1 with AnnotationMonitor

use of org.jbehave.core.configuration.AnnotationMonitor in project jbehave-core by jbehave.

the class PicoAnnotationBuilderBehaviour method shouldNotBuildContainerIfModuleNotInstantiable.

@Test
public void shouldNotBuildContainerIfModuleNotInstantiable() {
    AnnotationMonitor annotationMonitor = mock(AnnotationMonitor.class);
    PicoAnnotationBuilder builderPrivateModule = new PicoAnnotationBuilder(AnnotatedWithPrivateModule.class, annotationMonitor);
    assertThatStepsInstancesAre(builderPrivateModule.buildCandidateSteps());
    verify(annotationMonitor).elementCreationFailed(isA(Class.class), isA(Exception.class));
}
Also used : AnnotationMonitor(org.jbehave.core.configuration.AnnotationMonitor) ParseException(java.text.ParseException) Test(org.junit.Test)

Example 2 with AnnotationMonitor

use of org.jbehave.core.configuration.AnnotationMonitor in project jbehave-core by jbehave.

the class GuiceAnnotationBuilderBehaviour method shouldNotBuildContainerIfModuleNotInstantiable.

@Test
public void shouldNotBuildContainerIfModuleNotInstantiable() {
    AnnotationMonitor annotationMonitor = mock(AnnotationMonitor.class);
    AnnotationBuilder builderPrivateModule = new GuiceAnnotationBuilder(AnnotatedWithPrivateModule.class, annotationMonitor);
    assertThatStepsInstancesAre(builderPrivateModule.buildCandidateSteps());
    verify(annotationMonitor).elementCreationFailed(isA(Class.class), isA(Exception.class));
}
Also used : AnnotationBuilder(org.jbehave.core.configuration.AnnotationBuilder) AnnotationMonitor(org.jbehave.core.configuration.AnnotationMonitor) ParseException(java.text.ParseException) Test(org.junit.Test)

Aggregations

ParseException (java.text.ParseException)2 AnnotationMonitor (org.jbehave.core.configuration.AnnotationMonitor)2 Test (org.junit.Test)2 AnnotationBuilder (org.jbehave.core.configuration.AnnotationBuilder)1