use of junit.framework.TestResult in project android_frameworks_base by ParanoidAndroid.
the class TestSuiteBuilderTest method runSuite.
private SuiteExecutionRecorder runSuite(TestSuiteBuilder builder) {
TestSuite suite = builder.build();
SuiteExecutionRecorder recorder = new SuiteExecutionRecorder();
TestResult result = new TestResult();
result.addListener(recorder);
suite.run(result);
return recorder;
}
use of junit.framework.TestResult in project cucumber-jvm by cucumber.
the class SanityChecker method run.
public static void run(Class<?> testClass, boolean debug) {
JUnit4TestAdapter testAdapter = new JUnit4TestAdapter(testClass);
TestResult result = new TestResult();
SanityChecker listener = new SanityChecker();
result.addListener(listener);
testAdapter.run(result);
String output = listener.getOutput();
if (output.contains(INSANITY)) {
throw new RuntimeException("Something went wrong\n" + output);
}
if (debug) {
System.out.println("===== " + testClass.getName());
System.out.println(output);
System.out.println("=====");
}
}
use of junit.framework.TestResult in project android_frameworks_base by ResurrectionRemix.
the class InstrumentationTestSuiteBuilderTest method runSuite.
private SuiteExecutionRecorder runSuite(TestSuiteBuilder builder) {
TestSuite suite = builder.build();
SuiteExecutionRecorder recorder = new SuiteExecutionRecorder();
TestResult result = new TestResult();
result.addListener(recorder);
suite.run(result);
return recorder;
}
use of junit.framework.TestResult in project android_frameworks_base by ResurrectionRemix.
the class TestSuiteBuilderTest method runSuite.
private SuiteExecutionRecorder runSuite(TestSuiteBuilder builder) {
TestSuite suite = builder.build();
SuiteExecutionRecorder recorder = new SuiteExecutionRecorder();
TestResult result = new TestResult();
result.addListener(recorder);
suite.run(result);
return recorder;
}
use of junit.framework.TestResult in project android_frameworks_base by ResurrectionRemix.
the class UnitTestSuiteBuilderTest method runSuite.
private SuiteExecutionRecorder runSuite(TestSuiteBuilder builder) {
TestSuite suite = builder.build();
SuiteExecutionRecorder recorder = new SuiteExecutionRecorder();
TestResult result = new TestResult();
result.addListener(recorder);
suite.run(result);
return recorder;
}
Aggregations