use of org.junit.runner.JUnitCore in project java-algorithms-implementation by phishman3579.
the class AllTests method main.
/**
* @param args
*/
public static void main(String[] args) {
JUnitCore core = new JUnitCore();
core.run(AllTests.class);
}
use of org.junit.runner.JUnitCore in project zm-mailbox by Zimbra.
the class TestUtil method runTest.
public static void runTest(Class<?> testClass) {
JUnitCore junit = new JUnitCore();
junit.addListener(new TestLogger());
ZimbraLog.test.info("Starting unit test %s.", testClass.getName());
junit.run(testClass);
}
use of org.junit.runner.JUnitCore in project zm-mailbox by Zimbra.
the class ZimbraSuite method runTestsInternal.
private static TestResults runTestsInternal(Collection<Class> testClasses, Iterable<Request> requests) {
JUnitCore junit = new JUnitCore();
junit.addListener(new TestLogger());
TestResults results = new TestResults();
junit.addListener(results);
if (testClasses != null && testClasses.size() > 0) {
Class<?>[] classArray = new Class<?>[testClasses.size()];
testClasses.toArray(classArray);
junit.run(classArray);
}
if (requests != null) {
for (Request request : requests) {
junit.run(request);
}
}
return results;
}
use of org.junit.runner.JUnitCore in project zm-mailbox by Zimbra.
the class TestImapClient method main.
public static void main(String... args) throws Exception {
JUnitCore junit = new JUnitCore();
if (args.length > 0) {
for (String test : args) {
String method = String.format("test%C%s", test.charAt(0), test.substring(1));
junit.run(Request.method(TestImap.class, method));
}
} else {
junit.run(TestImap.class);
}
}
use of org.junit.runner.JUnitCore in project geode by apache.
the class CategoryWithParameterizedRunnerFactoryTest method testWorkingCategoryAndParameterized.
@Test
public void testWorkingCategoryAndParameterized() {
Request request = Request.aClass(WorkingCategoryClass.class);
ExposedParameterized runner = (ExposedParameterized) request.getRunner();
request = request.filterWith(new CategoryFilter((ExposedGetAnnotations) runner.getChildren().get(0)));
Result result = new JUnitCore().run(request);
assertEquals(2, result.getRunCount());
}
Aggregations