Package net.sourceforge.marathon.junit.textui

Examples of net.sourceforge.marathon.junit.textui.TextOutputter


    public void testOutput() throws IOException {
        Map<Test, MarathonTestResult> testOutputMap = new HashMap<Test, MarathonTestResult>();
        TestSuite suite = (TestSuite) new TestCreator(false, new StdOutConsole()).getTest("AllTests");
        createResult(suite, testOutputMap);
        StringWriter writer = new StringWriter();
        TextOutputter outputter = new TextOutputter();
        outputter.output(writer, suite, testOutputMap);
        String actual = writer.toString();
        String expected = "TestSuite: AllTests\n" + "Tests run: 4,  Failures: 1,  Errors: 1,  Time elapsed: 141.602 seconds\n\n"
                + "Testcase: subtest1   Passed\n" + " took 0 seconds\n\n" + "Testcase: subtest2   FAILED\n" + "Runtime Exception\n"
                + BaseTestRunner.getFilteredTrace(exception) + " took 0.102 seconds\n\n"
                + "Testcase: testcase1   Caused an ERROR\n" + "Runtime Exception\n" + BaseTestRunner.getFilteredTrace(exception)
View Full Code Here


        File temp = null;
        try {
            temp = File.createTempFile("marathon", ".txt");
            temp.deleteOnExit();
            if (reporter != null)
                reporter.generateReport(new TextOutputter(), temp.getCanonicalPath());
            new ReportViewer(temp);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.marathon.junit.textui.TextOutputter

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.