use of junit.framework.JUnit4TestAdapter 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());
}
}
use of junit.framework.JUnit4TestAdapter in project java-common-lib by sosy-lab.
the class NaiveOrderStatisticSetTest method suite.
public static junit.framework.Test suite() {
TestSortedSetGenerator<String> testSetGenerator = new OrderStatisticsSetProxyFactory();
TestSuite suite = NavigableSetTestSuiteBuilder.using(testSetGenerator).named("NaiveOrderStatisticSet").withFeatures(CollectionSize.ANY, SetFeature.GENERAL_PURPOSE, CollectionFeature.KNOWN_ORDER, CollectionFeature.SERIALIZABLE_INCLUDING_VIEWS).createTestSuite();
suite.addTest(new JUnit4TestAdapter(NaiveOrderStatisticSetTest.class));
return suite;
}
use of junit.framework.JUnit4TestAdapter in project java-common-lib by sosy-lab.
the class PersistentLinkedListTest method suite.
public static junit.framework.Test suite() throws NoSuchMethodException {
TestSuite suite = new TestSuite();
suite.addTest(new JUnit4TestAdapter(PersistentLinkedListTest.class));
suite.addTest(ListTestSuiteBuilder.using(listGenerator).named("PersistentLinkedList").withFeatures(CollectionFeature.KNOWN_ORDER, CollectionSize.ANY).suppressing(// These tests all rely on a fully implemented ListIterator.
ListLastIndexOfTester.class.getMethod("testFind_wrongType"), ListLastIndexOfTester.class.getMethod("testFind_no"), ListLastIndexOfTester.class.getMethod("testFind_yes"), ListLastIndexOfTester.class.getMethod("testFind_nullNotContainedAndUnsupported"), ListLastIndexOfTester.class.getMethod("testLastIndexOf_duplicate"), ListListIteratorTester.class.getMethod("testListIterator_tooLow"), ListListIteratorTester.class.getMethod("testListIterator_unmodifiable"), ListSubListTester.class.getMethod("testSubList_lastIndexOf")).createTestSuite());
return suite;
}
use of junit.framework.JUnit4TestAdapter in project eclipse.platform.releng by eclipse.
the class AllRelengTests method suite.
public static TestSuite suite() {
TestSuite suite = new TestSuite();
suite.addTest(new JUnit4TestAdapter(BuildTests.class));
if (isJGitAvailable())
suite.addTest(new JUnit4TestAdapter(GitCopyrightAdapterTest.class));
return suite;
}
use of junit.framework.JUnit4TestAdapter in project cucumber-jvm by cucumber.
the class SanityChecker method run.
static void run(Class<?> testClass, boolean debug) {
JUnit4TestAdapter testAdapter = new JUnit4TestAdapter(testClass);
TestResult result = new TestResult();
SanityChecker listener = new SanityChecker();
result.addListener(listener);
testAdapter.run(result);
String output = listener.getOutput();
if (output.contains(INSANITY)) {
throw new RuntimeException("Something went wrong\n" + output);
}
if (debug) {
System.out.println("===== " + testClass.getName());
System.out.println(output);
System.out.println("=====");
}
}
Aggregations