Package org.jbehave.core.configuration

Examples of org.jbehave.core.configuration.AnnotationBuilder.buildCandidateSteps()


    @Test
    public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndInheritingGuiceFromParent() {
        AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(InheritingAnnotatedUsingSteps.class);
        Configuration configuration = builderAnnotated.buildConfiguration();
        assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class);
    }

    @Test
    public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuiceAndConverters() {
        AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(AnnotatedUsingConfigureAndGuiceConverters.class);
View Full Code Here


    @Test
    public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuiceAndConverters() {
        AnnotationBuilder builderAnnotated = new GuiceAnnotationBuilder(AnnotatedUsingConfigureAndGuiceConverters.class);
        Configuration configuration = builderAnnotated.buildConfiguration();
        assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class);
    }

    @Test
    public void shouldBuildEmptyStepsListIfAnnotationOrAnnotatedValuesNotPresent() {
        AnnotationBuilder builderNotAnnotated = new GuiceAnnotationBuilder(NotAnnotated.class);
View Full Code Here

    }

    @Test
    public void shouldBuildEmptyStepsListIfAnnotationOrAnnotatedValuesNotPresent() {
        AnnotationBuilder builderNotAnnotated = new GuiceAnnotationBuilder(NotAnnotated.class);
        assertThatStepsInstancesAre(builderNotAnnotated.buildCandidateSteps());
        AnnotationBuilder builderAnnotatedWithoutLocations = new GuiceAnnotationBuilder(AnnotatedWithoutModules.class);
        assertThatStepsInstancesAre(builderAnnotatedWithoutLocations.buildCandidateSteps());
    }

    private void assertThatStepsInstancesAre(List<CandidateSteps> candidateSteps, Class<?>... stepsClasses) {
View Full Code Here

    @Test
    public void shouldBuildEmptyStepsListIfAnnotationOrAnnotatedValuesNotPresent() {
        AnnotationBuilder builderNotAnnotated = new GuiceAnnotationBuilder(NotAnnotated.class);
        assertThatStepsInstancesAre(builderNotAnnotated.buildCandidateSteps());
        AnnotationBuilder builderAnnotatedWithoutLocations = new GuiceAnnotationBuilder(AnnotatedWithoutModules.class);
        assertThatStepsInstancesAre(builderAnnotatedWithoutLocations.buildCandidateSteps());
    }

    private void assertThatStepsInstancesAre(List<CandidateSteps> candidateSteps, Class<?>... stepsClasses) {
        assertThat(candidateSteps.size(), equalTo(stepsClasses.length));
        for (int i = 0; i < stepsClasses.length; i++) {
View Full Code Here

   
    @Test
    public void shouldNotBuildContainerIfModuleNotInstantiable() {
        AnnotationMonitor annotationMonitor = mock(AnnotationMonitor.class);
        AnnotationBuilder builderPrivateModule = new GuiceAnnotationBuilder(AnnotatedWithPrivateModule.class, annotationMonitor);
        assertThatStepsInstancesAre(builderPrivateModule.buildCandidateSteps());
        verify(annotationMonitor).elementCreationFailed(isA(Class.class), isA(Exception.class));
    }

    @Test
    public void shouldCreateOnlyOneContainerForMultipleBuildInvocations() {
View Full Code Here

    @Test
    public void shouldBuildCandidateStepsFromAnnotationsUsingWeld() {
        AnnotationBuilder builderAnnotated = createBuilder(AnnotatedUsingWeld.class);
        Configuration configuration = builderAnnotated.buildConfiguration();
       
        assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), WeldStepBean.class);
    }
   
    @Test
    public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndWeldSteps() {
        AnnotationBuilder builderAnnotated = createBuilder(AnnotatedUsingWeldWithSteps.class);
View Full Code Here

    @Test
    public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndWeldSteps() {
        AnnotationBuilder builderAnnotated = createBuilder(AnnotatedUsingWeldWithSteps.class);
        Configuration configuration = builderAnnotated.buildConfiguration();
       
        assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration),WeldStepBean.class, FooSteps.class);
    }
   
    @Test
    public void shouldBuildOnlyWeldStepsListIfAnnotationOrAnnotatedValuesNotPresent() {
        AnnotationBuilder builderNotAnnotated = createBuilder(NotAnnotated.class);
View Full Code Here

    @Test
    public void shouldBuildOnlyWeldStepsListIfAnnotationOrAnnotatedValuesNotPresent() {
        AnnotationBuilder builderNotAnnotated = createBuilder(NotAnnotated.class);
        Configuration configuration = builderNotAnnotated.buildConfiguration();
       
        assertThatStepsInstancesAre(builderNotAnnotated.buildCandidateSteps(configuration),WeldStepBean.class);
    }
   
    @Test
    public void shouldCreateOnlyOneContainerForMultipleBuildInvocations() {
View Full Code Here

    @Test
    public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndInheritingPicoFromParent() {
        AnnotationBuilder builderAnnotated = new PicoAnnotationBuilder(InheritingAnnotatedUsingSteps.class);
        Configuration configuration = builderAnnotated.buildConfiguration();
        assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class);
    }

    @Test
    public void shouldBuildEmptyStepsListIfAnnotationOrAnnotatedValuesNotPresent() {
        PicoAnnotationBuilder builderNotAnnotated = new PicoAnnotationBuilder(NotAnnotated.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.