Examples of parameterConverters()


Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

  public void shouldBuildConfigurationFromAnnotationsUsingConfigureAndGuiceConverters() {
    final AnnotationBuilder builderAnnotated = new NeedleAnnotationBuilder(
        AnnotatedUsingConfigureAndNeedleConverters.class);
    final 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.Configuration.parameterConverters()

        AnnotatedUsingConfigureAndNeedleConverters.class);
    final Configuration configuration = builderAnnotated
        .buildConfiguration();
    assertThatCustomObjectIsConverted(configuration.parameterConverters());
    assertThatDateIsConvertedWithFormat(
        configuration.parameterConverters(), new SimpleDateFormat(
            "yyyy-MM-dd"));
    assertThatExamplesTableIsConverted(configuration.parameterConverters());
  }

  private void assertThatCustomObjectIsConverted(
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

        .buildConfiguration();
    assertThatCustomObjectIsConverted(configuration.parameterConverters());
    assertThatDateIsConvertedWithFormat(
        configuration.parameterConverters(), new SimpleDateFormat(
            "yyyy-MM-dd"));
    assertThatExamplesTableIsConverted(configuration.parameterConverters());
  }

  private void assertThatCustomObjectIsConverted(
      final ParameterConverters parameterConverters) {
    assertThat(((CustomObject) parameterConverters.convert("value",
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

        instanceOf(RegexPrefixCapturingPatternParser.class));
    assertThat(
        ((RegexPrefixCapturingPatternParser) configuration.stepPatternParser())
            .getPrefix(), equalTo("MyPrefix"));
    assertThatDateIsConvertedWithFormat(
        configuration.parameterConverters(), new SimpleDateFormat(
            "yyyy-MM-dd"));
    assertThat(configuration.parameterControls().nameDelimiterLeft(),
        equalTo("["));
    assertThat(configuration.parameterControls().nameDelimiterRight(),
        equalTo("]"));
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

        assertThat(configuration.failureStrategy(), instanceOf(SilentlyAbsorbingFailure.class));
        assertThat(configuration.storyLoader(), instanceOf(LoadFromURL.class));
        assertThat(configuration.stepPatternParser(), instanceOf(RegexPrefixCapturingPatternParser.class));
        assertThat(((RegexPrefixCapturingPatternParser) configuration.stepPatternParser()).getPrefix(),
                equalTo("MyPrefix"));
        assertThatCustomObjectIsConverted(configuration.parameterConverters());
        assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
        assertThat(configuration.storyReporterBuilder().formats(), hasItems(CONSOLE, HTML, TXT, XML, STATS));
        Keywords keywords = configuration.storyReporterBuilder().keywords();
        assertThat(keywords, instanceOf(LocalizedKeywords.class));
        assertThat(((LocalizedKeywords) keywords).getLocale(), equalTo(Locale.ITALIAN));
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

        assertThat(configuration.storyLoader(), instanceOf(LoadFromURL.class));
        assertThat(configuration.stepPatternParser(), instanceOf(RegexPrefixCapturingPatternParser.class));
        assertThat(((RegexPrefixCapturingPatternParser) configuration.stepPatternParser()).getPrefix(),
                equalTo("MyPrefix"));
        assertThatCustomObjectIsConverted(configuration.parameterConverters());
        assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
        assertThat(configuration.storyReporterBuilder().formats(), hasItems(CONSOLE, HTML, TXT, XML, STATS));
        Keywords keywords = configuration.storyReporterBuilder().keywords();
        assertThat(keywords, instanceOf(LocalizedKeywords.class));
        assertThat(((LocalizedKeywords) keywords).getLocale(), equalTo(Locale.ITALIAN));
        assertThat(configuration.storyReporterBuilder().outputDirectory().getName(), equalTo("my-output-directory"));
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

    @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());
    }

    @Test
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

    @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());
    }

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

Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

    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());
    }

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

Examples of org.jbehave.core.configuration.Configuration.parameterConverters()

                return Guice.createInjector(modules);
            }
           
        };
        Configuration configuration = builderAnnotated.buildConfiguration();
        assertThatCustomObjectIsConverted(configuration.parameterConverters());
        assertThatDateIsConvertedWithFormat(configuration.parameterConverters(), new SimpleDateFormat("yyyy-MM-dd"));
        assertThatExamplesTableIsConverted(configuration.parameterConverters());
    }

    private void assertThatCustomObjectIsConverted(ParameterConverters parameterConverters) {
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.