use of android.test.suitebuilder.ListTestCaseNames.TestDescriptor in project android_frameworks_base by ParanoidAndroid.
the class InstrumentationTestRunnerTest method testMultipleTestClass.
public void testMultipleTestClass() throws Exception {
String classArg = PlaceHolderTest.class.getName() + "," + PlaceHolderTest2.class.getName();
mInstrumentationTestRunner.onCreate(createBundle(InstrumentationTestRunner.ARGUMENT_TEST_CLASS, classArg));
Test test = mStubAndroidTestRunner.getTest();
assertContentsInOrder(ListTestCaseNames.getTestNames((TestSuite) test), new TestDescriptor(PlaceHolderTest.class.getName(), "testPlaceHolder"), new TestDescriptor(PlaceHolderTest2.class.getName(), "testPlaceHolder2"));
}
use of android.test.suitebuilder.ListTestCaseNames.TestDescriptor in project platform_frameworks_base by android.
the class InstrumentationTestRunnerTest method testMultipleTestClass.
public void testMultipleTestClass() throws Exception {
String classArg = PlaceHolderTest.class.getName() + "," + PlaceHolderTest2.class.getName();
mInstrumentationTestRunner.onCreate(createBundle(InstrumentationTestRunner.ARGUMENT_TEST_CLASS, classArg));
Test test = mStubAndroidTestRunner.getTest();
assertContentsInOrder(ListTestCaseNames.getTestNames((TestSuite) test), new TestDescriptor(PlaceHolderTest.class.getName(), "testPlaceHolder"), new TestDescriptor(PlaceHolderTest2.class.getName(), "testPlaceHolder2"));
}
use of android.test.suitebuilder.ListTestCaseNames.TestDescriptor in project platform_frameworks_base by android.
the class InstrumentationTestRunnerTest method assertContentsInOrder.
private void assertContentsInOrder(List<TestDescriptor> actual, TestDescriptor... source) {
TestDescriptor[] clonedSource = source.clone();
assertEquals("Unexpected number of items.", clonedSource.length, actual.size());
for (int i = 0; i < actual.size(); i++) {
TestDescriptor actualItem = actual.get(i);
TestDescriptor sourceItem = clonedSource[i];
assertEquals("Unexpected item. Index: " + i, sourceItem, actualItem);
}
}
use of android.test.suitebuilder.ListTestCaseNames.TestDescriptor in project android_frameworks_base by ResurrectionRemix.
the class InstrumentationTestRunnerTest method assertTestRunnerCalledWithExpectedParameters.
private void assertTestRunnerCalledWithExpectedParameters(String expectedTestClassName, String expectedTestMethodName) {
Test test = mStubAndroidTestRunner.getTest();
assertContentsInOrder(ListTestCaseNames.getTestNames((TestSuite) test), new TestDescriptor(expectedTestClassName, expectedTestMethodName));
assertTrue(mInstrumentationTestRunner.isStarted());
assertFalse(mInstrumentationTestRunner.isFinished());
}
use of android.test.suitebuilder.ListTestCaseNames.TestDescriptor in project android_frameworks_base by ResurrectionRemix.
the class InstrumentationTestRunnerTest method testMultipleTestClass.
public void testMultipleTestClass() throws Exception {
String classArg = PlaceHolderTest.class.getName() + "," + PlaceHolderTest2.class.getName();
mInstrumentationTestRunner.onCreate(createBundle(InstrumentationTestRunner.ARGUMENT_TEST_CLASS, classArg));
Test test = mStubAndroidTestRunner.getTest();
assertContentsInOrder(ListTestCaseNames.getTestNames((TestSuite) test), new TestDescriptor(PlaceHolderTest.class.getName(), "testPlaceHolder"), new TestDescriptor(PlaceHolderTest2.class.getName(), "testPlaceHolder2"));
}
Aggregations