Package au.com.rayh.report

Examples of au.com.rayh.report.TestSuite


        assertEquals("testThatFails", parser.currentTestCase.getName());
    }

    @Test
    public void shouldAddErrorToTestCase() throws Exception {
        parser.currentTestSuite = new TestSuite("host", "PisClientTestCase", new Date());
        parser.currentTestCase = new TestCase("PisClientTestCase", "testThatFails");
        String line = "/Users/ray/Development/Projects/Java/xcodebuild-hudson-plugin/work/jobs/PBS Streamer/workspace/PisClientTestCase.m:21: error: -[PisClientTestCase testThatFails] : \"((nil) != nil)\" should be true. This always fails";
        parser.handleLine(line);
        assertEquals(1, parser.currentTestCase.getFailures().size());
        assertEquals("/Users/ray/Development/Projects/Java/xcodebuild-hudson-plugin/work/jobs/PBS Streamer/workspace/PisClientTestCase.m:21", parser.currentTestCase.getFailures().get(0).getLocation());
View Full Code Here


        assertEquals("\"((nil) != nil)\" should be true. This always fails", parser.currentTestCase.getFailures().get(0).getMessage());
    }

    @Test
    public void shouldParsePassedTestCase() throws Exception {
        parser.currentTestSuite = new TestSuite("host", "PisClientTestCase", new Date());
        parser.currentTestCase = new TestCase("PisClientTestCase","testThatPasses");
        String line = "Test Case '-[PisClientTestCase testThatPasses]' passed (1.234 seconds).";
        parser.handleLine(line);
        assertNull(parser.currentTestCase);
        assertEquals(1, parser.currentTestSuite.getTestCases().size());
View Full Code Here

        assertEquals(0,parser.currentTestSuite.getFailures());
    }

    @Test
    public void shouldParseFailedTestCase() throws Exception {
        parser.currentTestSuite = new TestSuite("host", "PisClientTestCase", new Date());
        parser.currentTestCase = new TestCase("PisClientTestCase","testThatFails");
        String line = "Test Case '-[PisClientTestCase testThatFails]' failed (1.234 seconds).";
        parser.handleLine(line);
        assertNull(parser.currentTestCase);
        assertEquals(1, parser.currentTestSuite.getTestCases().size());
View Full Code Here

        assertEquals(new Date(Date.UTC(110, 9, 2, 13, 39, 23)), parser.currentTestSuite.getStartTime());
    }

    @Test
    public void shouldParseEndTestSuite() throws Exception {
        parser.currentTestSuite = new TestSuite("host", "PisClientTestCase", new Date());
        String line = "Test Suite 'PisClientTestCase' finished at 2010-10-02 13:41:23 GMT 0000.";
        parser.handleLine(line);
        assertNull(parser.currentTestSuite);
        assertEquals(0, parser.exitCode);
    }
View Full Code Here

        assertEquals(0, parser.exitCode);
    }

    @Test
    public void shouldParseStartTestCase() throws Exception {
        parser.currentTestSuite = new TestSuite("host", "PisClientTestCase", new Date());
        String line = "Test Case '-[PisClientTestCase testThatFails]' started.";
        parser.handleLine(line);
        assertNotNull(parser.currentTestCase);
        assertEquals("testThatFails", parser.currentTestCase.getName());
    }
View Full Code Here

    }

    protected void handleLine(String line) throws ParseException, IOException, InterruptedException, JAXBException {
        Matcher m = START_SUITE.matcher(line);
        if(m.matches()) {
            currentTestSuite = new TestSuite(InetAddress.getLocalHost().getHostName(), m.group(1), dateFormat.parse(m.group(2)));
            return;
        }

        m = END_SUITE.matcher(line);
        if(m.matches()) {
View Full Code Here

TOP

Related Classes of au.com.rayh.report.TestSuite

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.