Package net.thucydides.core.util

Examples of net.thucydides.core.util.MockEnvironmentVariables


        assertThat(testDataSourcePath.getInstanciatedPath("${DATADIR}/simple-semicolon-data.csv"), is("/some/dir/simple-semicolon-data.csv"));
    }

    @Test
    public void should_inject_user_home_directory_into_path() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("user.home","/home/john");
        FilePathParser testDataSourcePath = new FilePathParser(environmentVariables) {
            @Override
            protected String getFileSeparator() {
                return "/";
            }
View Full Code Here


    }

    @Test
    public void should_inject_user_home_directory_into_path_using_HOME_variable() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("user.home","/home/john");
        FilePathParser testDataSourcePath = new FilePathParser(environmentVariables) {
            @Override
            protected String getFileSeparator() {
                return "/";
            }
View Full Code Here

        assertThat(testDataSourcePath.getInstanciatedPath("$HOME/simple-semicolon-data.csv"), is("/home/john/simple-semicolon-data.csv"));
    }

    @Test
    public void should_inject_current_directory_into_path() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("user.dir","/home/john/work");
        FilePathParser testDataSourcePath = new FilePathParser(environmentVariables) {
            @Override
            protected String getFileSeparator() {
                return "/";
            }
View Full Code Here

    }

    @Test
    public void should_inject_current_directory_into_path_using_USERDIR_variable() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("user.dir","/home/john/work");
        FilePathParser testDataSourcePath = new FilePathParser(environmentVariables) {
            @Override
            protected String getFileSeparator() {
                return "/";
            }
View Full Code Here

    }

    @Test
    public void should_inject_current_directory_into_path_using_USERPROFILE_variable() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("user.home","/home/john");
        FilePathParser testDataSourcePath = new FilePathParser(environmentVariables) {
            @Override
            protected String getFileSeparator() {
                return "/";
            }
View Full Code Here

    MockEnvironmentVariables environmentVariables;

    @Before
    public void initMocks() {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
    }
View Full Code Here

    Configuration configuration;

    @Before
    public void initMocks() {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        configuration = new SystemPropertiesConfiguration(environmentVariables);
    }
View Full Code Here

        assertThat(formatted, is("a quick <strong>brown</strong> fox<br>jumped over a log"));
    }

    @Test
    public void formatter_should_render_asciidoc_if_configured() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("narrative.format","asciidoc");
        Formatter formatter = new Formatter(issueTracking, environmentVariables);
        String formatted = formatter.renderDescription("a quick *brown* fox\njumped over a log");
        assertThat(formatted, is("a quick <strong>brown</strong> fox<br>jumped over a log"));
    }
View Full Code Here

        assertThat(formatted, is("a quick <strong>brown</strong> fox<br>jumped over a log"));
    }

    @Test
    public void formatter_should_not_render_asciidoc_not_if_configured() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        Formatter formatter = new Formatter(issueTracking, environmentVariables);
        String formatted = formatter.renderDescription("a quick *brown* fox\njumped over a log");
        assertThat(formatted, is("a quick *brown* fox<br>jumped over a log"));
    }
View Full Code Here

            "</tr>\n"+
            "</tbody></table>\n";

    @Test
    public void formatter_should_leave_rendered_html_as_is() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        Formatter formatter = new Formatter(issueTracking, environmentVariables);
        String formatted = formatter.renderDescription(htmlDescription);
        assertThat(formatted, is(htmlDescription));
    }
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.