类android.test.AndroidTestCase源码实例Demo

下面列出了怎么用android.test.AndroidTestCase的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: android-test   文件: AndroidTestResult.java
@Override
protected void run(final TestCase test) {
  if (test instanceof AndroidTestCase) {
    ((AndroidTestCase) test).setContext(instr.getTargetContext());
  }
  if (test instanceof InstrumentationTestCase) {
    ((InstrumentationTestCase) test).injectInstrumentation(instr);
  }
  super.run(test);
}