use of junit.framework.TestSuite 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;
}
use of junit.framework.TestSuite in project android_frameworks_base by ResurrectionRemix.
the class TestCaseUtil method getTests.
private static List<? extends Test> getTests(Test test, boolean flatten, Set<Class<?>> seen) {
List<Test> testCases = Lists.newArrayList();
if (test != null) {
Test workingTest = null;
/*
* If we want to run a single TestCase method only, we must not
* invoke the suite() method, because we will run all test methods
* of the class then.
*/
if (test instanceof TestCase && ((TestCase) test).getName() == null) {
workingTest = invokeSuiteMethodIfPossible(test.getClass(), seen);
}
if (workingTest == null) {
workingTest = test;
}
if (workingTest instanceof TestSuite) {
TestSuite testSuite = (TestSuite) workingTest;
Enumeration enumeration = testSuite.tests();
while (enumeration.hasMoreElements()) {
Test childTest = (Test) enumeration.nextElement();
if (flatten) {
testCases.addAll(getTests(childTest, flatten, seen));
} else {
testCases.add(childTest);
}
}
} else {
testCases.add(workingTest);
}
}
return testCases;
}
use of junit.framework.TestSuite in project android_frameworks_base by ResurrectionRemix.
the class ConnectivityManagerStressTestRunner method getAllTests.
@Override
public TestSuite getAllTests() {
TestSuite suite = new InstrumentationTestSuite(this);
suite.addTestSuite(WifiApStress.class);
suite.addTestSuite(WifiStressTest.class);
return suite;
}
use of junit.framework.TestSuite in project android_frameworks_base by ResurrectionRemix.
the class OsTests method suite.
public static TestSuite suite() {
TestSuite suite = new TestSuite(OsTests.class.getName());
suite.addTestSuite(AidlTest.class);
suite.addTestSuite(BroadcasterTest.class);
suite.addTestSuite(FileObserverTest.class);
suite.addTestSuite(IdleHandlerTest.class);
suite.addTestSuite(MessageQueueTest.class);
suite.addTestSuite(MessengerTest.class);
suite.addTestSuite(PatternMatcherTest.class);
suite.addTestSuite(SystemPropertiesTest.class);
return suite;
}
use of junit.framework.TestSuite in project android_frameworks_base by ResurrectionRemix.
the class DownloadManagerTestRunner method getAllTests.
@Override
public TestSuite getAllTests() {
TestSuite suite = new InstrumentationTestSuite(this);
suite.addTestSuite(DownloadManagerTestApp.class);
return suite;
}
Aggregations