use of junit.framework.Test in project double-espresso by JakeWharton.
the class GoogleInstrumentationTestRunner method start.
@Override
public void start() {
List<TestCase> testCases = bridgeTestRunner.getAndroidTestRunner().getTestCases();
// Register a listener to update the current test description.
bridgeTestRunner.getAndroidTestRunner().addTestListener(new TestListener() {
@Override
public void startTest(Test test) {
runOnMainSync(new ActivityFinisher());
}
@Override
public void endTest(Test test) {
}
@Override
public void addFailure(Test test, AssertionFailedError ae) {
}
@Override
public void addError(Test test, Throwable t) {
}
});
super.start();
}
use of junit.framework.Test in project android_frameworks_base by crdroidandroid.
the class TestCaseUtil method getTestCaseNames.
@SuppressWarnings("unchecked")
public static List<String> getTestCaseNames(Test test, boolean flatten) {
List<Test> tests = (List<Test>) getTests(test, flatten);
List<String> testCaseNames = Lists.newArrayList();
for (Test aTest : tests) {
testCaseNames.add(getTestName(aTest));
}
return testCaseNames;
}
use of junit.framework.Test in project android_frameworks_base by crdroidandroid.
the class TestCaseUtil method getTestAtIndex.
public static Test getTestAtIndex(TestSuite testSuite, int position) {
int index = 0;
Enumeration enumeration = testSuite.tests();
while (enumeration.hasMoreElements()) {
Test test = (Test) enumeration.nextElement();
if (index == position) {
return test;
}
index++;
}
return null;
}
use of junit.framework.Test in project android_frameworks_base by crdroidandroid.
the class TestCaseUtilTest method testCreateTestForTestCaseWithSuiteMethod.
public void testCreateTestForTestCaseWithSuiteMethod() throws Exception {
Test test = TestCaseUtil.createTestSuite(OneTestTestCaseWithSuite.class);
assertEquals(1, test.countTestCases());
}
use of junit.framework.Test in project bnd by bndtools.
the class JUnitEclipseReport method report.
private void report(List<Test> flattened) {
for (int i = 0; i < flattened.size(); i++) {
StringBuffer sb = new StringBuffer();
sb.append(i + 1);
sb.append(",");
Test test = flattened.get(i);
if (test instanceof TestSuite || test instanceof JUnit4TestAdapter) {
sb.append(test);
sb.append(",");
sb.append(true);
} else {
sb.append(test);
sb.append(",");
sb.append(false);
}
sb.append(",");
sb.append(test.countTestCases());
message("%TSTTREE", sb.toString());
}
}
Aggregations