Examples of Description


Examples of org.jbehave.core.model.Description

        // Given
        ExamplesTable examplesTable = new ExamplesTable("|one|two|\n|1|2|\n");
        Map<String, String> tableRow = examplesTable.getRow(0);
        Scenario scenario1 = new Scenario("my title 1", Meta.EMPTY, GivenStories.EMPTY, examplesTable, asList("step <one>",
                "step <two>"));
        Story story = new Story(new Description("my blurb"), Narrative.EMPTY, asList(scenario1));
        Step step = mock(Step.class);
        StepResult result = mock(StepResult.class);
        when(step.perform(null)).thenReturn(result);
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
View Full Code Here

Examples of org.jbehave.core.model.Description

        ExamplesTable examplesTable = new ExamplesTable("|one|two|\n|1|2|\n|3|4|\n");
        Map<String, String> tableRow1 = examplesTable.getRow(0);
        Map<String, String> tableRow2 = examplesTable.getRow(1);
        Scenario scenario1 = new Scenario("my title 1", Meta.EMPTY, GivenStories.EMPTY, examplesTable, asList("step <one>",
                "step <two>"));
        Story story = new Story(new Description("my blurb"), Narrative.EMPTY, asList(scenario1));
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
        FailureStrategy failureStrategy = mock(FailureStrategy.class);
        Configuration configuration = configurationWith(reporter, collector, failureStrategy);
        configuration.storyControls().doDryRun(true);
View Full Code Here

Examples of org.jbehave.core.model.Description

    @Test
    public void shouldRunAfterAndBeforeScenarioSteps() throws Throwable{
        // Given
        Scenario scenario1 = new Scenario("my title 1", Meta.EMPTY, GivenStories.EMPTY, ExamplesTable.EMPTY, asList("step"));
        Story story = new Story(new Description("my blurb"), Narrative.EMPTY, asList(scenario1));
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
        FailureStrategy failureStrategy = mock(FailureStrategy.class);
        Configuration configuration = configurationWith(reporter, collector, failureStrategy);
        configuration.storyControls().doDryRun(true);
View Full Code Here

Examples of org.jbehave.core.model.Description

        Scenario scenario1 = new Scenario("my title 1", asList("failingStep",
                "successfulStep"));
        Scenario scenario2 = new Scenario("my title 2", asList("successfulStep"));
        Scenario scenario3 = new Scenario("my title 3", asList("successfulStep",
                "pendingStep"));
        Story story = new Story(new Description("my blurb"), Narrative.EMPTY, asList(scenario1,
                scenario2, scenario3));
        Step step = mock(Step.class);
        StepResult result = mock(StepResult.class, "result");
        when(step.perform(null)).thenReturn(result);
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
View Full Code Here

Examples of org.jbehave.core.model.Description

    public Story parseStory(String storyAsText) {
        return parseStory(storyAsText, null);
    }

    public Story parseStory(String storyAsText, String storyPath) {
        Description description = parseDescriptionFrom(storyAsText);
        Meta meta = parseStoryMetaFrom(storyAsText);
        Narrative narrative = parseNarrativeFrom(storyAsText);
        GivenStories givenStories = parseGivenStories(storyAsText);
        Lifecycle lifecycle = parseLifecycle(storyAsText);
        List<Scenario> scenarios = parseScenariosFrom(storyAsText);
View Full Code Here

Examples of org.jbehave.core.model.Description

    }

    private Description parseDescriptionFrom(String storyAsText) {
        Matcher findingDescription = patternToPullDescriptionIntoGroupOne().matcher(storyAsText);
        if (findingDescription.matches()) {
            return new Description(findingDescription.group(1).trim());
        }
        return Description.EMPTY;
    }
View Full Code Here

Examples of org.jboss.annotation.javaee.Description

      assertDescription("de", suffix, impl);
   }
  
   protected void assertDescription(String lang, String suffix, DescriptionsImpl impl)
   {
      Description description = impl.get(lang);
      assertNotNull(description);
      assertEquals(lang + "-" + suffix + "-desc", description.value());
   }
View Full Code Here

Examples of org.junit.runner.Description

            return new DefaultTestDescriptor(id, className, methodName);
        }
        // JUnit4TestCaseFacade is-a Describable in junit 4.7+
        if (test instanceof Describable) {
            Describable describable = (Describable) test;
            Description description = describable.getDescription();
            return new DefaultTestDescriptor(id, description.getClassName(), description.getMethodName());
        }
        return super.convert(id, test);
    }
View Full Code Here

Examples of org.junit.runner.Description

public class TestDescriptionInterceptor implements HttpRequestInterceptor{
    public static final String TEST_NAME_HEADER = "sling.test.name";
    public static final String TEST_CLASS_HEADER = "sling.test.class";

    public void process(HttpRequest httpRequest, HttpContext httpContext) throws HttpException, IOException {
       final Description desc = TestDescriptionRule.getCurrentTestDescription();
        if(desc != null){
            httpRequest.addHeader(TEST_NAME_HEADER,desc.getMethodName());
            httpRequest.addHeader(TEST_CLASS_HEADER,desc.getClassName());
        }
    }
View Full Code Here

Examples of org.junit.runner.Description

                        each.run(notifier);
        }

        @Override
        public Description getDescription() {
                Description spec= Description.createSuiteDescription(ExampleGraph.class);
                for (Runner runner : fRunners)
                        spec.addChild(runner.getDescription());
                return spec;
        }
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.