use of org.jbehave.core.configuration.AnnotationBuilder in project jbehave-core by jbehave.
the class NeedleAnnotationBuilderBehaviour method shouldBuildConfigurationFromAnnotationsUsingConfigureAndGuiceConverters.
@Test
public void shouldBuildConfigurationFromAnnotationsUsingConfigureAndGuiceConverters() {
final AnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(AnnotatedUsingConfigureAndNeedleConverters.class);
final Configuration configuration = builderAnnotated.buildConfiguration();
assertThatCustomObjectIsConverted(configuration.parameterConverters());
assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
assertThatExamplesTableIsConverted(configuration.parameterConverters());
}
use of org.jbehave.core.configuration.AnnotationBuilder in project jbehave-core by jbehave.
the class NeedleAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingNeedle.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingNeedle() {
final AnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(AnnotatedUsingNeedle.class);
final Configuration configuration = builderAnnotated.buildConfiguration();
assertThat(builderAnnotated.buildCandidateSteps(configuration).isEmpty(), is(true));
}
use of org.jbehave.core.configuration.AnnotationBuilder in project jbehave-core by jbehave.
the class WeldAnnotationBuilderBehaviour method createBuilder.
private AnnotationBuilder createBuilder(Class<?> type) {
WeldBootstrap bootstrap = new WeldBootstrap();
bootstrap.initialize();
AnnotationBuilder builder = bootstrap.findAnnotationBuilder(type);
assertThat(builder, is(AnnotationBuilder.class));
return builder;
}
use of org.jbehave.core.configuration.AnnotationBuilder in project jbehave-core by jbehave.
the class PicoAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingStepsAndInheritingPicoFromParent.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndInheritingPicoFromParent() {
AnnotationBuilder builderAnnotated = new PicoAnnotationBuilder(InheritingAnnotatedUsingSteps.class);
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 WeldAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingStepsAndWeldSteps.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndWeldSteps() {
AnnotationBuilder builderAnnotated = createBuilder(AnnotatedUsingWeldWithSteps.class);
Configuration configuration = builderAnnotated.buildConfiguration();
assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), WeldStepBean.class, FooSteps.class);
}
Aggregations