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);
}
}
}