Package net.sourceforge.marathon.junit.textui

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


            Test test = (Test) allTests.nextElement();
            if (test instanceof TestSuite)
                createResult((TestSuite) test, testOutputMap);
            else {
                MarathonTestCase testCase = (MarathonTestCase) test;
                MarathonTestResult result = new MarathonTestResult((junit.framework.Test) test);
                if (testCase.getName().equals("testcase1")) {
                    result.setStatus(MarathonTestResult.STATUS_ERROR);
                    result.setThrowable(exception);
                    result.setDuration(141.5);
                }
                if (testCase.getName().equals("subtest2")) {
                    result.setStatus(MarathonTestResult.STATUS_FAILURE);
                    result.setThrowable(exception);
                    result.setDuration(0.102);
                }
                testOutputMap.put(test, result);
            }
        }
    }
View Full Code Here


            Test test = (Test) allTests.nextElement();
            if (test instanceof TestSuite)
                createResult((TestSuite) test, testOutputMap);
            else {
                MarathonTestCase testCase = (MarathonTestCase) test;
                MarathonTestResult result = new MarathonTestResult((junit.framework.Test) test);
                if (testCase.getName().equals("testcase1")) {
                    result.setStatus(MarathonTestResult.STATUS_ERROR);
                    result.setThrowable(exception);
                    result.setDuration(141.5);
                }
                if (testCase.getName().equals("subtest2")) {
                    result.setStatus(MarathonTestResult.STATUS_FAILURE);
                    result.setThrowable(exception);
                    result.setDuration(0.102);
                }
                testOutputMap.put(test, result);
            }
        }
    }
View Full Code Here

            Test test = (Test) allTests.nextElement();
            if (test instanceof TestSuite)
                createResult((TestSuite) test, testOutputMap);
            else {
                MarathonTestCase testCase = (MarathonTestCase) test;
                MarathonTestResult result = new MarathonTestResult((junit.framework.Test) test);
                if (testCase.getName().equals("testcase1")) {
                    result.setStatus(MarathonTestResult.STATUS_ERROR);
                    result.setThrowable(exception);
                    result.setDuration(141.5);
                }
                if (testCase.getName().equals("subtest2")) {
                    result.setStatus(MarathonTestResult.STATUS_FAILURE);
                    result.setThrowable(exception);
                    result.setDuration(0.102);
                }
                testOutputMap.put(test, result);
            }
        }
    }
View Full Code Here

        this.test = test;
        testOutputMap = new HashMap<Test, MarathonTestResult>();
    }

    public synchronized void startTest(Test test) {
        testOutputMap.put(test, new MarathonTestResult(test));
        testStartTime = System.currentTimeMillis();
    }
View Full Code Here

    }

    public synchronized void endTest(Test test) {
        long testEndTime = System.currentTimeMillis();
        double duration = (testEndTime - testStartTime) / (1000.0);
        MarathonTestResult result = (MarathonTestResult) testOutputMap.get(test);
        if (result != null) {
            result.setDuration(duration);
        }
    }
View Full Code Here

    public synchronized void addError(Test test, Throwable throwable) {
        addDefect(test, throwable, MarathonTestResult.STATUS_ERROR);
    }

    private void addDefect(Test test, Throwable throwable, int status) {
        MarathonTestResult result = (MarathonTestResult) testOutputMap.get(test);
        if (result != null) {
            result.setStatus(status);
            result.setThrowable(throwable);
        }
    }
View Full Code Here

TOP

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

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.