Methods Summary |
---|
private static java.lang.String | packageFor(java.lang.Class clazz)
String className = clazz.getName();
return className.substring(0, className.lastIndexOf('."));
|
private android.test.suitebuilder.InstrumentationTestSuiteBuilderTest$SuiteExecutionRecorder | runSuite(TestSuiteBuilder builder)
TestSuite suite = builder.build();
SuiteExecutionRecorder recorder = new SuiteExecutionRecorder();
TestResult result = new TestResult();
result.addListener(recorder);
suite.run(result);
return recorder;
|
protected void | setUp()
super.setUp();
instrumentationTestSuiteBuilder = new InstrumentationTestSuiteBuilder(getClass());
|
public void | testShouldIncludeIntrumentationTests()
instrumentationTestSuiteBuilder.includePackages(packageFor(InstrumentationTest.class));
SuiteExecutionRecorder recorder = runSuite(instrumentationTestSuiteBuilder);
assertEquals(1, recorder.testsSeen.size());
assertTrue(recorder.saw("InstrumentationTest.testInstrumentation"));
|
public void | testShouldOnlyIncludeIntrumentationTests()
TestSuite testSuite = new OuterTest()
.buildTestsUnderHereWith(instrumentationTestSuiteBuilder);
List<String> testCaseNames = getTestCaseNames(testSuite);
assertEquals(1, testCaseNames.size());
assertEquals("testInstrumentation", testCaseNames.get(0));
|