use of org.jbehave.core.configuration.MostUsefulConfiguration in project jbehave-core by jbehave.
the class SpringStepsFactoryAOPBehaviour method aopEnvelopedStepsCanBeCreated.
@Test
public void aopEnvelopedStepsCanBeCreated() {
// Given
ApplicationContext context = createApplicationContext(StepsWithAOPAnnotationConfiguration.class.getName());
SpringStepsFactory factory = new SpringStepsFactory(new MostUsefulConfiguration(), context);
// When
List<CandidateSteps> steps = factory.createCandidateSteps();
// Then
assertAOPFooStepsFound(steps);
}
use of org.jbehave.core.configuration.MostUsefulConfiguration in project jbehave-core by jbehave.
the class SpringStepsFactoryBehaviour method annotationStepsWithDependenciesCanBeCreated.
@Test
public void annotationStepsWithDependenciesCanBeCreated() {
// Given
ApplicationContext context = createApplicationContext(StepsWithDependencyAnnotationConfiguration.class.getName());
// When
SpringStepsFactory factory = new SpringStepsFactory(new MostUsefulConfiguration(), context);
List<CandidateSteps> steps = factory.createCandidateSteps();
// Then
assertFooStepsFound(steps);
assertThat((int) findInstanceOfType(steps, FooStepsWithDependency.class).integer, equalTo(42));
}
use of org.jbehave.core.configuration.MostUsefulConfiguration in project jbehave-core by jbehave.
the class NeedleAnnotationBuilderBehaviour method shouldBuildDefaultConfigurationIfAnnotationOrAnnotatedValuesNotPresent.
@Test
public void shouldBuildDefaultConfigurationIfAnnotationOrAnnotatedValuesNotPresent() {
final AnnotationBuilder builderNotAnnotated = new NeedleAnnotationBuilder(NotAnnotated.class);
assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(), new MostUsefulConfiguration());
final AnnotationBuilder builderAnnotatedWithoutModules = new NeedleAnnotationBuilder(AnnotatedWithoutInjectors.class);
assertThatConfigurationIs(builderAnnotatedWithoutModules.buildConfiguration(), new MostUsefulConfiguration());
}
use of org.jbehave.core.configuration.MostUsefulConfiguration in project jbehave-core by jbehave.
the class SpringStepsFactoryBehaviour method stepsCanBeCreated.
@Test
public void stepsCanBeCreated() {
// Given
ApplicationContext context = createApplicationContext("org/jbehave/core/steps/spring/steps.xml");
SpringStepsFactory factory = new SpringStepsFactory(new MostUsefulConfiguration(), context);
// When
List<CandidateSteps> steps = factory.createCandidateSteps();
// Then
assertFooStepsFound(steps);
}
use of org.jbehave.core.configuration.MostUsefulConfiguration in project jbehave-core by jbehave.
the class SpringStepsFactoryBehaviour method stepsWithDependenciesCanBeCreated.
@Test
public void stepsWithDependenciesCanBeCreated() {
// Given
ApplicationContext context = createApplicationContext("org/jbehave/core/steps/spring/steps-with-dependency.xml");
// When
SpringStepsFactory factory = new SpringStepsFactory(new MostUsefulConfiguration(), context);
List<CandidateSteps> steps = factory.createCandidateSteps();
// Then
assertFooStepsFound(steps);
assertThat((int) findInstanceOfType(steps, FooStepsWithDependency.class).integer, equalTo(42));
}
Aggregations