Package net.thucydides.core.util

Examples of net.thucydides.core.util.MockEnvironmentVariables


    ConsoleLoggingListener consoleLoggingListener;

    @Before
    public void initMocks() {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        consoleLoggingListener = new ConsoleLoggingListener(environmentVariables, logger);
    }
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

    public ExtendedTemporaryFolder temp = new ExtendedTemporaryFolder();

    @Before
    public void initMocks() throws IOException {
        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        environmentVariables.setProperty("thucydides.logging","VERBOSE");

        factory = new StepFactory(new Pages(driver));

        consoleStepListener = new ConsoleStepListener();
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

    Configuration configuration;

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

    private WebDriver driver;
    WebDriverFactory factory;

    @Before
    public void setupFactory() {
        environmentVariables = new MockEnvironmentVariables();
        factory = new WebDriverFactory(environmentVariables);
    }
View Full Code Here

    @Before
    public void initMocks() {

        MockitoAnnotations.initMocks(this);
        environmentVariables = new MockEnvironmentVariables();
        when(testOutcome.getSessionId()).thenReturn(A_SESSION_ID);
    }
View Full Code Here

    }

    @Test
    public void the_thread_for_batch_1_should_only_run_tests_in_that_batch() throws InitializationError, InterruptedException {

        MockEnvironmentVariables threadVariables = new MockEnvironmentVariables();
        threadVariables.setProperty("thucydides.batch.count", "3");
        threadVariables.setProperty("thucydides.batch.number", Integer.toString(1));
        SystemVariableBasedBatchManager batchManager = new SystemVariableBasedBatchManager(threadVariables);

        runTestCases(batchManager);

        assertThat(executedTests.size(), is(3));
View Full Code Here

    }

    @Test
    public void the_thread_for_batch_2_should_only_run_tests_in_that_batch() throws InitializationError, InterruptedException {

        MockEnvironmentVariables threadVariables = new MockEnvironmentVariables();
        threadVariables.setProperty("thucydides.batch.count", "3");
        threadVariables.setProperty("thucydides.batch.number", Integer.toString(2));
        SystemVariableBasedBatchManager batchManager = new SystemVariableBasedBatchManager(threadVariables);

        runTestCases(batchManager);

        assertThat(executedTests.size(), is(3));
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.