Search in sources :

Example 61 with Configuration

use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.

the class PicoAnnotationBuilderBehaviour method shouldBuildCandidateStepsFromAnnotationsUsingPico.

@Test
public void shouldBuildCandidateStepsFromAnnotationsUsingPico() {
    PicoAnnotationBuilder builderAnnotated = new PicoAnnotationBuilder(AnnotatedUsingPico.class);
    Configuration configuration = builderAnnotated.buildConfiguration();
    assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class, FooStepsWithDependency.class);
}
Also used : Configuration(org.jbehave.core.configuration.Configuration) MostUsefulConfiguration(org.jbehave.core.configuration.MostUsefulConfiguration) Test(org.junit.Test)

Example 62 with Configuration

use of org.jbehave.core.configuration.Configuration 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);
}
Also used : Configuration(org.jbehave.core.configuration.Configuration) MostUsefulConfiguration(org.jbehave.core.configuration.MostUsefulConfiguration) AnnotationBuilder(org.jbehave.core.configuration.AnnotationBuilder) Test(org.junit.Test)

Example 63 with Configuration

use of org.jbehave.core.configuration.Configuration 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);
}
Also used : Configuration(org.jbehave.core.configuration.Configuration) MostUsefulConfiguration(org.jbehave.core.configuration.MostUsefulConfiguration) AnnotationBuilder(org.jbehave.core.configuration.AnnotationBuilder) Test(org.junit.Test)

Example 64 with Configuration

use of org.jbehave.core.configuration.Configuration in project jbehave-core by jbehave.

the class WeldAnnotationBuilderBehaviour method shouldBuildOnlyWeldStepsListIfAnnotationOrAnnotatedValuesNotPresent.

@Test
public void shouldBuildOnlyWeldStepsListIfAnnotationOrAnnotatedValuesNotPresent() {
    AnnotationBuilder builderNotAnnotated = createBuilder(NotAnnotated.class);
    Configuration configuration = builderNotAnnotated.buildConfiguration();
    assertThatStepsInstancesAre(builderNotAnnotated.buildCandidateSteps(configuration), WeldStepBean.class);
}
Also used : Configuration(org.jbehave.core.configuration.Configuration) MostUsefulConfiguration(org.jbehave.core.configuration.MostUsefulConfiguration) AnnotationBuilder(org.jbehave.core.configuration.AnnotationBuilder) Test(org.junit.Test)

Aggregations

Configuration (org.jbehave.core.configuration.Configuration)64 MostUsefulConfiguration (org.jbehave.core.configuration.MostUsefulConfiguration)61 Test (org.junit.Test)55 AnnotationBuilder (org.jbehave.core.configuration.AnnotationBuilder)18 StoryReporter (org.jbehave.core.reporters.StoryReporter)15 ConcurrentStoryReporter (org.jbehave.core.reporters.ConcurrentStoryReporter)13 StoryPathResolver (org.jbehave.core.io.StoryPathResolver)11 ByteArrayOutputStream (java.io.ByteArrayOutputStream)10 OutputStream (java.io.OutputStream)10 PrintStream (java.io.PrintStream)10 Matchers.containsString (org.hamcrest.Matchers.containsString)10 InjectableEmbedder (org.jbehave.core.InjectableEmbedder)10 UsingEmbedder (org.jbehave.core.annotations.UsingEmbedder)10 AbstractStep (org.jbehave.core.steps.StepCreator.AbstractStep)10 ArrayList (java.util.ArrayList)9 HashMap (java.util.HashMap)8 JUnitStory (org.jbehave.core.junit.JUnitStory)8 Story (org.jbehave.core.model.Story)8 SimpleDateFormat (java.text.SimpleDateFormat)7 RunContext (org.jbehave.core.embedder.PerformableTree.RunContext)7