Examples of buildConfiguration()


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

    assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(),
        new MostUsefulConfiguration());
    final AnnotationBuilder builderAnnotatedWithoutModules = new NeedleAnnotationBuilder(
        AnnotatedWithoutInjectors.class);
    assertThatConfigurationIs(
        builderAnnotatedWithoutModules.buildConfiguration(),
        new MostUsefulConfiguration());
  }

  private void assertThatConfigurationIs(
      final Configuration builtConfiguration,
View Full Code Here

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

  @Test
  public void shouldBuildCandidateStepsFromAnnotationsUsingNeedle() {
    final AnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(
        AnnotatedUsingNeedle.class);
    final Configuration configuration = builderAnnotated
        .buildConfiguration();
    assertTrue(builderAnnotated.buildCandidateSteps(configuration)
        .isEmpty());
  }
View Full Code Here

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

  @Test
  public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndNeedle() {
    final AnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(
        AnnotatedUsingStepsAndNeedle.class);
    final Configuration configuration = builderAnnotated
        .buildConfiguration();
    assertThatStepsInstancesAre(
        builderAnnotated.buildCandidateSteps(configuration),
        FooSteps.class);
  }
View Full Code Here

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

  @Test
  public void shouldBuildCandidateStepsFromAnnotationsUsingStepsAndGuiceAndConverters() {
    final AnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(
        AnnotatedUsingConfigureAndNeedleConverters.class);
    final Configuration configuration = builderAnnotated
        .buildConfiguration();
    assertThatStepsInstancesAre(
        builderAnnotated.buildCandidateSteps(configuration),
        FooSteps.class);
  }
View Full Code Here

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

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

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

public class GuiceAnnotationBuilderBehaviour {

    @Test
    public void shouldBuildConfigurationFromAnnotations() {
        AnnotationBuilder builder = new GuiceAnnotationBuilder(AnnotatedUsingGuice.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));
        assertThat(configuration.stepPatternParser(), instanceOf(RegexPrefixCapturingPatternParser.class));
View Full Code Here

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

    }

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

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

            protected Injector createInjector(List<Module> modules) {
                return Guice.createInjector(modules);
            }
           
        };
        Configuration configuration = builderAnnotated.buildConfiguration();
        assertThatCustomObjectIsConverted(configuration.parameterConverters());
        assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
        assertThatExamplesTableIsConverted(configuration.parameterConverters());
    }
View Full Code Here

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

    }

    @Test
    public void shouldBuildDefaultConfigurationIfAnnotationOrAnnotatedValuesNotPresent() {
        AnnotationBuilder builderNotAnnotated = new GuiceAnnotationBuilder(NotAnnotated.class);
        assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(), new MostUsefulConfiguration());
        AnnotationBuilder builderAnnotatedWithoutModules = new GuiceAnnotationBuilder(AnnotatedWithoutModules.class);
        assertThatConfigurationIs(builderAnnotatedWithoutModules.buildConfiguration(), new MostUsefulConfiguration());
    }

    private void assertThatConfigurationIs(Configuration builtConfiguration, Configuration defaultConfiguration) {
View Full Code Here

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

    @Test
    public void shouldBuildDefaultConfigurationIfAnnotationOrAnnotatedValuesNotPresent() {
        AnnotationBuilder builderNotAnnotated = new GuiceAnnotationBuilder(NotAnnotated.class);
        assertThatConfigurationIs(builderNotAnnotated.buildConfiguration(), new MostUsefulConfiguration());
        AnnotationBuilder builderAnnotatedWithoutModules = new GuiceAnnotationBuilder(AnnotatedWithoutModules.class);
        assertThatConfigurationIs(builderAnnotatedWithoutModules.buildConfiguration(), new MostUsefulConfiguration());
    }

    private void assertThatConfigurationIs(Configuration builtConfiguration, Configuration defaultConfiguration) {
        assertThat(builtConfiguration.failureStrategy(), instanceOf(defaultConfiguration.failureStrategy().getClass()));
        assertThat(builtConfiguration.storyLoader(), instanceOf(defaultConfiguration.storyLoader().getClass()));
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.