private RunStatistics runClasses( Class<?>... classes )
throws TestSetFailedException
{
HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
final DefaultReporterFactory reporterManagerFactory = createReporterFactory();
org.junit.runner.notification.RunListener demultiplexingRunListener =
createRunListener( reporterManagerFactory, classMethodCounts );
JUnitCore jUnitCore = new JUnitCore();
jUnitCore.addListener( demultiplexingRunListener );
Computer computer = new Computer();
jUnitCore.run( computer, classes );
reporterManagerFactory.close();
return reporterManagerFactory.getGlobalRunStatistics();
}