Package net.thucydides.core.model

Examples of net.thucydides.core.model.TestOutcome


        return new BaseMatcher<TestOutcome>() {

            @Override
            public boolean matches(Object matchee) {
                TestOutcome testOutcome =  (TestOutcome) matchee;
                return exists(testOutcome.getTags(), having(on(TestTag.class), is(expectedTag)));
            }

            @Override
            public void describeTo(Description description) {
                description.appendText("a test outcome with a tag ").appendValue(expectedTag);
View Full Code Here


        return mapper;
    }

    @Override
    public TestOutcome fromJson(InputStream inputStream) throws IOException {
        TestOutcome outcome = reader.readValue(inputStream);
        checkConstraints(outcome);
        return outcome;
    }
View Full Code Here

    }

    private void generateQueuedReport(ListenableFuture<TestOutcome> future, TestOutcomes testOutcomes, AcceptanceTestReporter reporter) {
        try {
            final TestOutcome outcome = future.get();
            LOGGER.info("Processing test outcome " + outcome.getCompleteName());
            generateReportFor(outcome, testOutcomes, reporter);
        } catch (InterruptedException e) {
            throw new RuntimeException("Report generation failure", e);
        } catch (ExecutionException e) {
            throw new RuntimeException("Report generation failure", e);
View Full Code Here

        steps.step_one();
        steps.step_two();

        StepEventBus.getEventBus().testFinished(testOutcome);

        TestOutcome outcome = stepListener.getTestOutcomes().get(0);
        assertThat(outcome.getUserStory().getName(), is("My story"));
    }
View Full Code Here

        StepEventBus.getEventBus().testSuiteStarted(MyOtherStory.class);

        StepEventBus.getEventBus().testStarted("app_should_work", MyOtherTestCase.class);
        StepEventBus.getEventBus().testFinished(testOutcome);

        TestOutcome outcome = stepListener.getTestOutcomes().get(0);
        assertThat(outcome.getUserStory().getName(), is("My story"));
        TestOutcome outcome2 = stepListener.getTestOutcomes().get(1);
        assertThat(outcome2.getUserStory().getName(), is("My story"));
        TestOutcome outcome3 = stepListener.getTestOutcomes().get(2);
        assertThat(outcome3.getUserStory().getName(), is("My other story"));
    }
View Full Code Here

        StepEventBus.getEventBus().testSuiteStarted(MyStory.class);
        StepEventBus.getEventBus().testStarted("app_should_work", MyStory.class);

        StepEventBus.getEventBus().testFinished(testOutcome);

        TestOutcome outcome = stepListener.getTestOutcomes().get(0);
        assertThat(outcome.getUserStory().getName(), is("My story"));
    }
View Full Code Here

        StepEventBus.getEventBus().testSuiteStarted(net.thucydides.core.model.Story.from(MyStory.class));
        StepEventBus.getEventBus().testStarted("app should work");

        StepEventBus.getEventBus().testFinished(testOutcome);

        TestOutcome outcome = stepListener.getTestOutcomes().get(0);
        assertThat(outcome.getUserStory().getName(), is("My story"));
    }
View Full Code Here

        StepEventBus.getEventBus().testStarted("app_should_work", MyStory.class);
        StepEventBus.getEventBus().testStarted("app should work", net.thucydides.core.model.Story.from(MyStory.class));

        StepEventBus.getEventBus().testFinished(testOutcome);

        TestOutcome outcome = stepListener.getTestOutcomes().get(0);
        assertThat(outcome.getUserStory().getName(), is("My story"));
    }
View Full Code Here

        StepEventBus.getEventBus().testFinished(testOutcome);

        StepEventBus.getEventBus().testStarted("app should work", net.thucydides.core.model.Story.from(AnotherStory.class));
        StepEventBus.getEventBus().testFinished(testOutcome);

        TestOutcome outcome = stepListener.getTestOutcomes().get(0);
        assertThat(outcome.getUserStory().getName(), is("My story"));

        TestOutcome outcome2 = stepListener.getTestOutcomes().get(1);
        assertThat(outcome2.getUserStory().getName(), is("My story"));

        TestOutcome outcome3 = stepListener.getTestOutcomes().get(2);
        assertThat(outcome3.getUserStory().getName(), is("Another story"));

    }
View Full Code Here

        StepEventBus.getEventBus().testSuiteStarted(MyStory.class);
        StepEventBus.getEventBus().testStarted("app should work", MyStory.class);

        StepEventBus.getEventBus().testFinished(testOutcome);

        TestOutcome outcome = stepListener.getTestOutcomes().get(0);
        assertThat(outcome.getUserStory().getName(), is("My story"));
    }
View Full Code Here

TOP

Related Classes of net.thucydides.core.model.TestOutcome

Copyright © 2018 www.massapicom. 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.