use of org.jbehave.core.configuration.AnnotationBuilder in project jbehave-core by jbehave.
the class WeldAnnotationBuilderBehaviour method shouldBuildConfigurationFromAnnotationsUsingConfigureAndConverters.
@Test
public void shouldBuildConfigurationFromAnnotationsUsingConfigureAndConverters() {
AnnotationBuilder builderAnnotated = createBuilder(AnnotatedUsingConfigureAndConverters.class);
Configuration configuration = builderAnnotated.buildConfiguration();
assertThatCustomObjectIsConverted(configuration.parameterConverters());
assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
}
use of org.jbehave.core.configuration.AnnotationBuilder in project jbehave-core by jbehave.
the class WeldAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingWeld.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingWeld() {
AnnotationBuilder builderAnnotated = createBuilder(AnnotatedUsingWeld.class);
Configuration configuration = builderAnnotated.buildConfiguration();
assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), WeldStepBean.class);
}
use of org.jbehave.core.configuration.AnnotationBuilder in project jbehave-core by jbehave.
the class NeedleAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingStepsAndNeedle.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndNeedle() {
final AnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(AnnotatedUsingStepsAndNeedle.class);
final Configuration configuration = builderAnnotated.buildConfiguration();
assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class);
}
use of org.jbehave.core.configuration.AnnotationBuilder 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.AnnotationBuilder in project jbehave-core by jbehave.
the class GuiceAnnotationBuilderBehaviour method shouldBuildDefaultConfigurationIfAnnotationOrAnnotatedValuesNotPresent.
@Test
public void shouldBuildDefaultConfigurationIfAnnotationOrAnnotatedValuesNotPresent() {
AnnotationBuilder builderNotAnnotated = new GuiceAnnotationBuilder(NotAnnotated.class);
assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(), new MostUsefulConfiguration());
AnnotationBuilder builderAnnotatedWithoutModules = new GuiceAnnotationBuilder(AnnotatedWithoutModules.class);
assertThatConfigurationIs(builderAnnotatedWithoutModules.buildConfiguration(), new MostUsefulConfiguration());
}
Aggregations