writer().println("There were " + result.failureCount() + " failures:");
int i = 1;
writer().println("\nFailure Summary:");
for (Enumeration e= result.failures(); e.hasMoreElements(); i++) {
TestFailure failure= (TestFailure) e.nextElement();
writer().println(i + ") " + failure.failedTest());
}
i = 1;
writer().println("\nFailure Details:");
for (Enumeration e= result.failures(); e.hasMoreElements(); i++) {
TestFailure failure= (TestFailure) e.nextElement();
writer().println("\n"+ i + ") " + failure.failedTest());
Throwable t= failure.thrownException();
if (t.getMessage() != null)
writer().println("\t\"" + t.getMessage() + "\"");
else {
writer().println();
failure.thrownException().printStackTrace();
}
}
}
}