private void rerunTest(Test test) {
if (!(test instanceof TestCase)) {
showInfo("Could not reload "+ test.toString());
return;
}
Test reloadedTest= null;
TestCase rerunTest= (TestCase)test;
try {
Class reloadedTestClass= getLoader().reload(test.getClass());
reloadedTest= TestSuite.createTest(reloadedTestClass, rerunTest.getName());
} catch(Exception e) {
showInfo("Could not reload "+ test.toString());
return;
}
TestResult result= new TestResult();
reloadedTest.run(result);
String message= reloadedTest.toString();
if(result.wasSuccessful())
showInfo(message+" was successful");
else if (result.errorCount() == 1)
showStatus(message+" had an error");
else