use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.
the class GuiceAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingGuice.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingGuice() {
AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(AnnotatedUsingGuice.class);
Configuration configuration = builderAnnotated.buildConfiguration();
assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class, FooStepsWithDependency.class);
}
use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.
the class GuiceAnnotationBuilderBehaviour method shouldBuildConfigurationFromAnnotationsUsingInjectorWithoutParent.
@Test
public void shouldBuildConfigurationFromAnnotationsUsingInjectorWithoutParent() {
AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(AnnotatedUsingConfigureAndGuiceConverters.class) {
@Override
protected Injector createInjector(List<Module> modules) {
return Guice.createInjector(modules);
}
};
Configuration configuration = builderAnnotated.buildConfiguration();
assertThatCustomObjectIsConverted(configuration.parameterConverters());
assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
assertThatExamplesTableIsConverted(configuration.parameterConverters());
}
use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.
the class GuiceAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingStepsAndInheritingGuiceFromParent.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndInheritingGuiceFromParent() {
AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(InheritingAnnotatedUsingSteps.class);
Configuration configuration = builderAnnotated.buildConfiguration();
assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class);
}
use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.
the class GuiceAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuice.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuice() {
AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(AnnotatedUsingStepsAndGuice.class);
Configuration configuration = builderAnnotated.buildConfiguration();
assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class);
}
use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.
the class GuiceAnnotationBuilderBehaviour method shouldBuildConfigurationFromAnnotationsUsingConfigureAndGuiceConverters.
@Test
public void shouldBuildConfigurationFromAnnotationsUsingConfigureAndGuiceConverters() {
AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(AnnotatedUsingConfigureAndGuiceConverters.class);
Configuration configuration = builderAnnotated.buildConfiguration();
assertThatCustomObjectIsConverted(configuration.parameterConverters());
assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
assertThatExamplesTableIsConverted(configuration.parameterConverters());
}
Aggregations