Search in sources :

Example 1 with JUnit4TestAdapter

use of junit.framework.JUnit4TestAdapter in project cucumber-jvm by cucumber.

the class SanityChecker method run.

public 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("=====");
    }
}
Also used : TestResult(junit.framework.TestResult) JUnit4TestAdapter(junit.framework.JUnit4TestAdapter)

Example 2 with JUnit4TestAdapter

use of junit.framework.JUnit4TestAdapter in project jena by apache.

the class TestSPARQLUpdate method suite.

public static junit.framework.TestSuite suite() {
    TestSuite ts = new TestSuite();
    ts.addTest(new JUnit4TestAdapter(TestSPARQLUpdate.class));
    return ts;
}
Also used : TestSuite(junit.framework.TestSuite) JUnit4TestAdapter(junit.framework.JUnit4TestAdapter)

Example 3 with JUnit4TestAdapter

use of junit.framework.JUnit4TestAdapter in project jena by apache.

the class TestSPARQLUpdateMgt method suite.

public static TestSuite suite() {
    TestSuite ts = new TestSuite();
    ts.addTest(new JUnit4TestAdapter(TestSPARQLUpdateMgt.class));
    return ts;
}
Also used : TestSuite(junit.framework.TestSuite) JUnit4TestAdapter(junit.framework.JUnit4TestAdapter)

Example 4 with JUnit4TestAdapter

use of junit.framework.JUnit4TestAdapter in project jena by apache.

the class ARQTestSuite method suite.

public static TestSuite suite() {
    // We have to do things JUnit3 style in order to
    // have scripted tests, which use JUnit3-style dynamic test building.
    // This does not seem to be possible in org.junit.*
    TestSuite ts = new ARQTestSuite();
    // No warnings (e.g. bad lexical forms).
    BaseTest2.setTestLogging();
    // ARQ dependencies
    ts.addTest(new JUnit4TestAdapter(TC_Atlas_ARQ.class));
    ts.addTest(new JUnit4TestAdapter(TC_Common.class));
    ts.addTest(new JUnit4TestAdapter(TC_Riot.class));
    ts.addTest(new JUnit4TestAdapter(TS_Web.class));
    ts.addTest(new JUnit4TestAdapter(TS_System.class));
    // Main ARQ internal test suite.
    ts.addTest(new JUnit4TestAdapter(TC_General.class));
    ts.addTest(TC_Scripted.suite());
    ts.addTest(TC_DAWG.suite());
    // Fiddle around with the config if necessary
    if (false) {
        QueryEngineMain.unregister();
        QueryEngineRef.register();
    }
    return ts;
}
Also used : TS_Web(org.apache.jena.web.TS_Web) TestSuite(junit.framework.TestSuite) TS_System(org.apache.jena.system.TS_System) TC_Atlas_ARQ(org.apache.jena.atlas.legacy.TC_Atlas_ARQ) JUnit4TestAdapter(junit.framework.JUnit4TestAdapter) TC_Common(org.apache.jena.common.TC_Common) TC_Riot(org.apache.jena.riot.TC_Riot)

Example 5 with JUnit4TestAdapter

use of junit.framework.JUnit4TestAdapter in project alfresco-remote-api by Alfresco.

the class CMMApiTestSuite method suite.

/**
 * Creates the test suite
 *
 * @return the test suite
 */
public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTest(new JUnit4TestAdapter(TestCustomModel.class));
    suite.addTest(new JUnit4TestAdapter(TestCustomTypeAspect.class));
    suite.addTest(new JUnit4TestAdapter(TestCustomProperty.class));
    suite.addTest(new JUnit4TestAdapter(TestCustomConstraint.class));
    suite.addTest(new JUnit4TestAdapter(TestCustomModelExport.class));
    return suite;
}
Also used : TestSuite(junit.framework.TestSuite) JUnit4TestAdapter(junit.framework.JUnit4TestAdapter)

Aggregations

JUnit4TestAdapter (junit.framework.JUnit4TestAdapter)74 TestSuite (junit.framework.TestSuite)50 TestResult (junit.framework.TestResult)17 Test (org.junit.Test)6 Test (junit.framework.Test)2 Result (org.junit.runner.Result)2 I18nManagerTest (com.agiletec.aps.system.services.i18n.I18nManagerTest)1 I18nManagerCacheWrapperTest (com.agiletec.aps.system.services.i18n.cache.I18nManagerCacheWrapperTest)1 KeyGeneratorManagerTest (com.agiletec.aps.system.services.keygenerator.KeyGeneratorManagerTest)1 LangManagerTest (com.agiletec.aps.system.services.lang.LangManagerTest)1 ContentManagerTest (com.agiletec.plugins.jacms.aps.system.services.content.ContentManagerTest)1 ContentModelManagerTest (com.agiletec.plugins.jacms.aps.system.services.contentmodel.ContentModelManagerTest)1 ContentPageMapperManagerTest (com.agiletec.plugins.jacms.aps.system.services.contentpagemapper.ContentPageMapperManagerTest)1 ContentMapperCacheWrapperTest (com.agiletec.plugins.jacms.aps.system.services.contentpagemapper.cache.ContentMapperCacheWrapperTest)1 ResourceManagerTest (com.agiletec.plugins.jacms.aps.system.services.resource.ResourceManagerTest)1 ListLastIndexOfTester (com.google.common.collect.testing.testers.ListLastIndexOfTester)1 ListListIteratorTester (com.google.common.collect.testing.testers.ListListIteratorTester)1 ListSubListTester (com.google.common.collect.testing.testers.ListSubListTester)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 IOException (java.io.IOException)1