Package net.thucydides.core.util

Examples of net.thucydides.core.util.EnvironmentVariables


    }

    @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


    }

    @Test
    public void should_inject_Windows_application_directory_into_path_using_APPDATA_variable() {
        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        ((MockEnvironmentVariables)environmentVariables).setValue("APPDATA","/home/john/work");
        FilePathParser testDataSourcePath = new FilePathParser(environmentVariables) {
            @Override
            protected String getFileSeparator() {
                return "/";
View Full Code Here

 
  private final BatchManager batchManager;
 
  @Inject
  public BatchManagerProvider(Configuration configuration){
    EnvironmentVariables environmentVariables = configuration.getEnvironmentVariables();
        String batchManagerProperty = ThucydidesSystemProperty.THUCYDIDES_BATCH_STRATEGY.from(environmentVariables,
                BatchStrategy.DIVIDE_EQUALLY.name());
        try {
          batchManager = BatchStrategy.valueOf(batchManagerProperty).instance(environmentVariables);
        } catch (Exception e) {
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

    }

    @Test
    public void should_print_shortened_header_banner_before_tests() {

        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("thucydides.console.headings", "normal");
        ConsoleLoggingListener consoleLoggingListener = new ConsoleLoggingListener(environmentVariables, logger);
        verify(logger).info(contains("THUCYDIDES"));

    }
View Full Code Here

    }

    @Test
    public void should_print_full_header_banner_before_tests() {

        EnvironmentVariables environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("thucydides.console.headings", "ascii");
        Logger logger = mock(Logger.class);
        ConsoleLoggingListener consoleLoggingListener = new ConsoleLoggingListener(environmentVariables, logger);
        verify(logger).info(contains(
                "-------------------------------------------------------------------------------------------------------\n" +
                        ".___________. __    __   __    __    ______ ____    ____  _______   __   _______   _______     _______.\n" +
View Full Code Here

TOP

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

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.