Package net.thucydides.core.util

Examples of net.thucydides.core.util.SystemEnvironmentVariables


    }

    @Test
    public void should_be_able_to_set_Thycydides_system_properties_easily() {

        String originalIssueTracker = new SystemPropertiesIssueTracking(new SystemEnvironmentVariables()).getIssueTrackerUrl();

        ThucydidesSystemProperties.getProperties().setValue(ThucydidesSystemProperty.THUCYDIDES_ISSUE_TRACKER_URL, "http://arbitrary.issue.tracker");

        String updatedIssueTracker = ThucydidesSystemProperties.getProperties().getValue(ThucydidesSystemProperty.THUCYDIDES_ISSUE_TRACKER_URL);;
View Full Code Here


    @Test
    public void should_be_able_to_read_boolean_system_values() {
        System.setProperty("some.boolean.value", "true");

        SystemEnvironmentVariables environmentVariables = new SystemEnvironmentVariables();
        Boolean value = environmentVariables.getPropertyAsBoolean("some.boolean.value", false);
        System.clearProperty("some.boolean.value");
        assertThat(value, is(true));
    }
View Full Code Here

    @Test
    public void should_be_able_to_read_boolean_system_value_if_set_to_nothing() {
        System.setProperty("some.boolean.value", "");

        SystemEnvironmentVariables environmentVariables = new SystemEnvironmentVariables();
        Boolean value = environmentVariables.getPropertyAsBoolean("some.boolean.value", false);
        System.clearProperty("some.boolean.value");
        assertThat(value, is(true));
    }
View Full Code Here

    @Test
    public void should_be_able_to_read_issue_tracker_url() {
        ThucydidesSystemProperties.getProperties().setValue(ThucydidesSystemProperty.THUCYDIDES_ISSUE_TRACKER_URL, "http://arbitrary.issue.tracker");

        String issueTracker = new SystemPropertiesIssueTracking(new SystemEnvironmentVariables()).getIssueTrackerUrl();

        assertThat(issueTracker, is("http://arbitrary.issue.tracker"));

    }
View Full Code Here

    @Test
    public void should_be_able_to_read_jira_issue_tracker_url() {
        ThucydidesSystemProperties.getProperties().setValue(ThucydidesSystemProperty.JIRA_URL, "http://arbitrary.issue.tracker");

        String issueTracker = new SystemPropertiesIssueTracking(new SystemEnvironmentVariables()).getIssueTrackerUrl();

        assertThat(issueTracker, is("http://arbitrary.issue.tracker/browse/{0}"));

    }
View Full Code Here

TOP

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

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.