Package net.mindengine.galen.suite.reader

Examples of net.mindengine.galen.suite.reader.GalenSuiteReader


            throw new RuntimeException("Couldn't find any test files");
        }
    }

    private void runTestFiles(List<File> basicTestFiles, List<File> jsTestFiles, CompleteListener listener, GalenArguments arguments) throws IOException {
        GalenSuiteReader reader = new GalenSuiteReader();
       
        List<GalenTest> tests = new LinkedList<GalenTest>();
        for (File file : basicTestFiles) {
            tests.addAll(reader.read(file));
        }
       
        JsTestCollector testCollector = new JsTestCollector(tests);
        for (File jsFile: jsTestFiles) {
            testCollector.execute(jsFile);
View Full Code Here


public class GalenSuiteReaderTest {

    private static final Object EMPTY_TAGS = new LinkedList<String>();

    @Test public void shouldRead_simpleSuite_successfully() throws IOException {
        GalenSuiteReader reader = new GalenSuiteReader();
       
        List<GalenBasicTest> galenSuites = reader.read(new File(getClass().getResource("/suites/suite-simple.test").getFile()));
       
        assertThat("Amount of suites should be", galenSuites.size(), is(2));
        /* Checking suite 1*/
        {
            GalenBasicTest suite = galenSuites.get(0);
View Full Code Here

            assertThat(page.getActions(), is(actions(GalenPageActions.check(asList("page3.spec")))));
        }
    }
   
    @Test public void shouldRead_allPageActions() throws IOException {
        GalenSuiteReader reader = new GalenSuiteReader();
        List<GalenBasicTest> galenSuites = reader.read(new File(getClass().getResource("/suites/suite-all-page-actions.test").getFile()));
        assertThat(galenSuites.size(), is(1));
       
        List<GalenPageAction> pageActions = galenSuites.get(0).getPageTests().get(0).getActions();
       
        assertThat(pageActions.size(), is(6));
View Full Code Here

       
    @Test public void shouldRead_suiteWithVariables_successfully() throws IOException {
       
        System.setProperty("some.system.property", "custom property");
       
        GalenSuiteReader reader = new GalenSuiteReader();
       
        List<GalenBasicTest> galenSuites = reader.read(new File(getClass().getResource("/suites/suite-variables.txt").getFile()));
       
        assertThat("Amount of suites should be", galenSuites.size(), is(2));
       
        /* Checking suite 1*/
        {
View Full Code Here

    }
   
   
    @SuppressWarnings("unchecked")
    @Test public void shouldRead_suiteWithParameterizations_successfully() throws IOException {
        GalenSuiteReader reader = new GalenSuiteReader();
       
        List<GalenBasicTest> galenSuites = reader.read(new File(getClass().getResource("/suites/suite-parameterized.test").getFile()));
       
        assertThat("Amount of suites should be", galenSuites.size(), is(11));
       
        /* Checking first group of suites */
        {
View Full Code Here

      
    }
   
    @Test
    public void shouldParse_suitesWithEmptyUrls() throws IOException {
        GalenSuiteReader reader = new GalenSuiteReader();
       
        List<GalenBasicTest> galenSuites = reader.read(new File(getClass().getResource("/suites/suite-empty-url.test").getFile()));
       
        assertThat("Amount of suites should be", galenSuites.size(), is(4));
       
        for (int i = 0; i < 4; i++) {
            assertThat(galenSuites.get(i).getName(), is("Suite " + (i+1)));
View Full Code Here

        assertThat(galenSuites.get(3).getPageTests().get(0).getScreenSize(), is(nullValue()));
    }
   
    @Test
    public void shouldNotInclude_disabledSuites() throws IOException {
        GalenSuiteReader reader = new GalenSuiteReader();
       
        List<GalenBasicTest> galenSuites = reader.read(new File(getClass().getResource("/suites/suite-disabled.test").getFile()));
       
        assertThat("Amount of suites should be", galenSuites.size(), is(3));
        assertThat(galenSuites.get(0).getName(), is("Suite 1"));
        assertThat(galenSuites.get(1).getName(), is("Suite 2"));
        assertThat(galenSuites.get(2).getName(), is("Suite 3"));
View Full Code Here

        assertThat(galenSuites.get(2).getName(), is("Suite 3"));
    }
   
    @Test
    public void shouldIncludeEverything_forImportedTestSuites() throws IOException {
        GalenSuiteReader reader = new GalenSuiteReader();
       
        List<GalenBasicTest> galenSuites = reader.read(new File(getClass().getResource("/suites/suite-import.test").getFile()));
       
        assertThat("Amount of suites should be", galenSuites.size(), is(3));
        assertThat(galenSuites.get(0).getName(), is("Suite 1"));
        assertThat(galenSuites.get(1).getName(), is("Suite 2"));
        assertThat(galenSuites.get(2).getName(), is("Suite 3 imported test suite name"));
View Full Code Here

   
   
    @Test(dataProvider="provideBadSamples") public void shouldGiveError_withLineNumberInformation_whenParsingIncorrectSuite(String filePath, int expectedLine, String expectedMessage) throws IOException {
        FileSyntaxException exception = null;
        try {
            new GalenSuiteReader().read(new File(getClass().getResource(filePath).getFile()));
        }
        catch (FileSyntaxException e) {
            exception = e;
            System.out.println("***************");
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of net.mindengine.galen.suite.reader.GalenSuiteReader

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.