Package net.thucydides.core.util

Examples of net.thucydides.core.util.MockEnvironmentVariables


    }

    @Before
    public void initMocks() {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        configuration = new SystemPropertiesConfiguration(environmentVariables);

        when(driver.navigate()).thenReturn(navigation);

        StepEventBus.getEventBus().clear();
View Full Code Here


    }

    @Test
    public void source_should_not_be_mandatory() throws MojoFailureException, MojoExecutionException, IOException {

        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("thucydides.adaptors.fileless","net.thucydides.maven.plugins.FilelessAdaptor");

        ThucydidesAdaptorMojo plugin = new ThucydidesAdaptorMojo(environmentVariables);
        plugin.setFormat("fileless");
        plugin.setOutputDirectory(outputDirectory);
View Full Code Here

    public AbstractReportGenerationTest() {
    }

    @Before
    public void setupTestReporter() throws IOException {
        environmentVariables = new MockEnvironmentVariables();
        IssueTracking issueTracking = new SystemPropertiesIssueTracking(environmentVariables);
        reporter = new HtmlAcceptanceTestReporter(environmentVariables, issueTracking);
        outputDirectory = temporaryDirectory.newFolder();
        reporter.setOutputDirectory(outputDirectory);
    }
View Full Code Here

    Configuration configuration;

    @Before
    public void initMocks() {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("max.retries", "1");
        configuration = new SystemPropertiesConfiguration(environmentVariables);
    }
View Full Code Here

    }

    @Test
    public void a_test_outcome_should_record_issue_keys_using_the_project_key_if_not_provided() {
        TestOutcome outcome = TestOutcome.forTest("should_do_some_other_thing", SomeTestScenario.class);
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();

        environmentVariables.setProperty("thucydides.project.key", "ISSUE");
        outcome.setEnvironmentVariables(environmentVariables);


        assertThat(outcome.getIssueKeys(), hasItem("ISSUE-789"));
    }
View Full Code Here

    }


    @Test
    public void a_test_outcome_should_inject_issue_links_from_the_Issue_annotation_if_requested() {
        MockEnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("jira.url", "http://my.jira");
        IssueTracking issueTracking = new SystemPropertiesIssueTracking(environmentVariables);

        TestOutcome outcome = TestOutcome.forTest("should_do_this", SomeTestScenario.class)
                .usingIssueTracking(issueTracking);
View Full Code Here

        assertThat(outcome.getFormattedIssues(), is("(#<a target=\"_blank\" href=\"http://my.jira/browse/ISSUE-123\">ISSUE-123</a>)"));
    }

    @Test
    public void a_test_outcome_should_inject_multiple__issue_links_from_the_Issue_annotation_if_requested() {
        MockEnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("jira.url", "http://my.jira");
        IssueTracking issueTracking = new SystemPropertiesIssueTracking(environmentVariables);

        TestOutcome outcome = TestOutcome.forTest("should_do_this", SomeOtherTestScenario.class)
                .usingIssueTracking(issueTracking);
View Full Code Here

    final static class CSVDataDrivenTestScenarioFromSpecifiedDataDirectory {}

    @Test
    public void should_load_test_data_from_a_specified_directory() throws IOException {

        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("thucydides.data.dir","test-data");
        TestClass testClass = new TestClass(CSVDataDrivenTestScenarioFromSpecifiedDataDirectory.class);

        List<PersonTestScenario> testScenarios
                = DataDrivenAnnotations.forClass(testClass)
                                       .usingEnvironmentVariables(environmentVariables)
View Full Code Here

                return firefoxDriver;
            }

        };

        environmentVariables = new MockEnvironmentVariables();
        webDriverFactory = new WebDriverFactory(webdriverInstanceFactory, environmentVariables);
        StepEventBus.getEventBus().clear();

    }
View Full Code Here

    TestableJQueryEnabledPage page;

    @Before
    public void initMocks() {
        environmentVariables = new MockEnvironmentVariables();

        MockitoAnnotations.initMocks(this);

        page = new TestableJQueryEnabledPage(driver, environmentVariables);
    }
View Full Code Here

TOP

Related Classes of net.thucydides.core.util.MockEnvironmentVariables

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.