Examples of AnnotationBuilder


Examples of org.jbehave.core.configuration.AnnotationBuilder

        assertThatStepsInstancesAre(builderAnnotated.buildCandidateSteps(configuration), FooSteps.class);
    }

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

Examples of org.jbehave.core.configuration.AnnotationBuilder

    }
   
    @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));
    }
View Full Code Here

Examples of org.jbehave.core.configuration.AnnotationBuilder

    public Object createTest() {
        return annotationBuilder().embeddableInstance();
    }

    public AnnotationBuilder annotationBuilder() {
        return new AnnotationBuilder(testClass());
    }
View Full Code Here

Examples of org.jbehave.core.configuration.AnnotationBuilder

public class WeldAnnotationBuilderBehaviour {

    @Test
    public void shouldBuildConfigurationFromAnnotations() {
        AnnotationBuilder builder = createBuilder(AnnotatedUsingWeld.class);
        Configuration configuration = builder.buildConfiguration();

        assertThat(configuration.storyControls().dryRun(), is(true));
        assertThat(configuration.storyControls().skipScenariosAfterFailure(), is(true));
        assertThat(configuration.failureStrategy(), instanceOf(SilentlyAbsorbingFailure.class));
        assertThat(configuration.storyLoader(), instanceOf(LoadFromURL.class));
View Full Code Here

Examples of org.jbehave.core.configuration.AnnotationBuilder

    }
   
    @Test
    public void shouldBuildConfigurationFromAnnotationsUsingConfigureAndConverters() {
       
        AnnotationBuilder builderAnnotated = createBuilder(AnnotatedUsingConfigureAndConverters.class);
       
        Configuration configuration = builderAnnotated.buildConfiguration();
        assertThatCustomObjectIsConverted(configuration.parameterConverters());
        assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
    }
View Full Code Here

Examples of org.jbehave.core.configuration.AnnotationBuilder

    }
   
    @Test
    public void shouldBuildDefaultConfigurationIfAnnotationNotPresent() {

        AnnotationBuilder builderNotAnnotated = createBuilder(NotAnnotated.class);
        assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(), new MostUsefulConfiguration());
    }
View Full Code Here

Examples of org.jbehave.core.configuration.AnnotationBuilder

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

Examples of org.jbehave.core.configuration.AnnotationBuilder

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

Examples of org.jbehave.core.configuration.AnnotationBuilder

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

Examples of org.jbehave.core.configuration.AnnotationBuilder

    }
   
    @Test
    public void shouldCreateOnlyOneContainerForMultipleBuildInvocations() {

        AnnotationBuilder builderAnnotated = createBuilder(AnnotatedUsingWeld.class);
        Configuration configuration = builderAnnotated.buildConfiguration();
        assertThat(builderAnnotated.buildConfiguration(), sameInstance(configuration));
    }
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.