use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.
the class GuiceAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuiceAndConverters.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuiceAndConverters() {
AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(AnnotatedUsingConfigureAndGuiceConverters.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 Embedder method reportMatchingStepdocs.
public void reportMatchingStepdocs(String stepAsString) {
Configuration configuration = configuration();
List<CandidateSteps> candidateSteps = candidateSteps();
StepFinder finder = configuration.stepFinder();
StepdocReporter reporter = configuration.stepdocReporter();
List<Stepdoc> matching = finder.findMatching(stepAsString, candidateSteps);
List<Object> stepsInstances = finder.stepsInstances(candidateSteps);
reporter.stepdocsMatching(stepAsString, matching, stepsInstances);
}
use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.
the class NeedleAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuiceAndConverters.
@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuiceAndConverters() {
final AnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(AnnotatedUsingConfigureAndNeedleConverters.class);
final 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 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.Configuration 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));
}
Aggregations