Package net.thucydides.core.model

Examples of net.thucydides.core.model.DataTable$DataTableBuilder


        }
    }

    private void buildTestRunnersForEachDataSetUsing(final WebDriverFactory webDriverFactory,
        final BatchManager batchManager) throws Throwable {
        DataTable parametersTable = getTestAnnotations().getParametersTableFromTestDataAnnotation();
        for (int i = 0; i < parametersTable.getRows().size(); i++) {
            Class<?> testClass = getTestClass().getJavaClass();
            ThucydidesRunner runner = new TestClassRunnerForParameters(testClass,
                                                                       configuration,
                                                                       webDriverFactory,
                                                                       batchManager,
                                                                       parametersTable,
                                                                       i);
            runner.useQualifier(from(parametersTable.getRows().get(i).getValues()));
            runners.add(runner);
        }
    }
View Full Code Here


    private void buildTestRunnersFromADataSourceUsing(final WebDriverFactory webDriverFactory,
        final BatchManager batchManager) throws Throwable {

        List<?> testCases = getTestAnnotations().getDataAsInstancesOf(getTestClass().getJavaClass());
        DataTable parametersTable = getTestAnnotations().getParametersTableFromTestDataSource();
        for (int i = 0; i < testCases.size(); i++) {
            Object testCase = testCases.get(i);
            ThucydidesRunner runner = new TestClassRunnerForInstanciatedTestCase(testCase,
                                                                                 configuration,
                                                                                 webDriverFactory,
View Full Code Here

    }

    @Test
    public void the_parameterized_data_method_returns_the_set_of_test_data() throws Throwable {
        TestClass testClass = new TestClass(DataDrivenTestScenario.class);
        DataTable testDataTable = DataDrivenAnnotations.forClass(testClass).getParametersTableFromTestDataAnnotation();

        assertThat(testDataTable.getRows().size(), is(3));

    }
View Full Code Here

    }

    @Test
    public void testData_without_parameter_names_defines_default_parameter_names() throws Throwable {
        TestClass testClass = new TestClass(DataDrivenTestScenario.class);
        DataTable testDataTable = DataDrivenAnnotations.forClass(testClass).getParametersTableFromTestDataAnnotation();
        List<String> parameterNames = testDataTable.getHeaders();

        assertThat(parameterNames.size(), is(2));
        int i = 0;
        for (String parameterName : parameterNames) {
            assertThat(parameterName, is("Parameter " + (i+1)) );
View Full Code Here

    }

    @Test
    public void testData_with_parameter_names_uses_defined_parameter_names() throws Throwable {
        TestClass testClass = new TestClass(DataDrivenTestScenarioWithParamNames.class);
        DataTable testDataTable = DataDrivenAnnotations.forClass(testClass).getParametersTableFromTestDataAnnotation();
        List<String> parameterNames = testDataTable.getHeaders();

        assertThat(parameterNames.size(), is(2));
        assertThat(parameterNames.get(0), is("param-A"));
        assertThat(parameterNames.get(1), is("param-B"));
    }
View Full Code Here

    }

    @Test
    public void should_be_able_to_get_data_Table_from_csv() throws Throwable {
        TestClass testClass = new TestClass(CSVDataDrivenTestScenario.class);
        DataTable testDataTable = DataDrivenAnnotations.forClass(testClass).getParametersTableFromTestDataSource();

        List<String> parameterNames = testDataTable.getHeaders();

        assertThat(parameterNames.size(), is(3));
        assertThat(parameterNames.get(0), is("NAME"));
        assertThat(parameterNames.get(1), is("AGE"));
        assertThat(parameterNames.get(2), is("ADDRESS"));
View Full Code Here

    }

    @Test
    public void should_be_able_to_get_data_Table_from_a_semicolon_delimited_csv() throws Throwable {
        TestClass testClass = new TestClass(CSVDataDrivenTestScenarioUsingSemiColons.class);
        DataTable testDataTable = DataDrivenAnnotations.forClass(testClass).getParametersTableFromTestDataSource();

        List<String> parameterNames = testDataTable.getHeaders();

        assertThat(parameterNames.size(), is(3));
        assertThat(parameterNames.get(0), is("NAME"));
        assertThat(parameterNames.get(1), is("AGE"));
        assertThat(parameterNames.get(2), is("ADDRESS"));
View Full Code Here

TOP

Related Classes of net.thucydides.core.model.DataTable$DataTableBuilder

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.