Examples of ByLevenshteinDistance


Examples of org.jbehave.core.steps.StepFinder.ByLevenshteinDistance

                .withFormats(Format.XML);

        Configuration configuration = new MostUsefulConfiguration()
                .useStoryLoader(new LoadFromClasspath(this.getClass())).useStoryReporterBuilder(storyReporterBuilder)
                .useFailureStrategy(new SilentlyAbsorbingFailure())
                .useStepCollector(new MarkUnmatchedStepsAsPending(new StepFinder(new ByLevenshteinDistance())));

        Embedder embedder = new Embedder();
        embedder.useEmbedderControls(new EmbedderControls().doGenerateViewAfterStories(false));
        embedder.useConfiguration(configuration);
        embedder.useCandidateSteps(new InstanceStepsFactory(configuration, new MySteps()).createCandidateSteps());
View Full Code Here

Examples of org.jbehave.core.steps.StepFinder.ByLevenshteinDistance

                .withFormats(Format.XML);

        Configuration configuration = new MostUsefulConfiguration()
                .useStoryLoader(new LoadFromClasspath(this.getClass())).useStoryReporterBuilder(storyReporterBuilder)
                .useFailureStrategy(new SilentlyAbsorbingFailure())
                .useStepCollector(new MarkUnmatchedStepsAsPending(new StepFinder(new ByLevenshteinDistance())));

        Embedder embedder = new Embedder();
        embedder.useEmbedderControls(new EmbedderControls().doGenerateViewAfterStories(false));
        embedder.useConfiguration(configuration);
        embedder.useCandidateSteps(new InstanceStepsFactory(configuration, new MySteps()).createCandidateSteps());
View Full Code Here

Examples of org.jbehave.core.steps.StepFinder.ByLevenshteinDistance

        when(candidate1.createMatchedStep(stepAsString, parameters)).thenReturn(step1);
        when(candidate2.createMatchedStep(stepAsString, parameters)).thenReturn(step2);
        when(candidate3.createMatchedStep(stepAsString, parameters)).thenReturn(step3);
        when(candidate4.createMatchedStep(stepAsString, parameters)).thenReturn(step4);

        StepCollector stepCollector = new MarkUnmatchedStepsAsPending(new StepFinder(new ByLevenshteinDistance()));
        List<Step> steps = stepCollector.collectScenarioSteps(asList(steps1, steps2),
                new Scenario(asList(stepAsString)), parameters);

        // Then the step with highest priority is returned
        assertThat(step4, equalTo(steps.get(0)));
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.