Example usage for junit.framework TestSuite TestSuite

List of usage examples for junit.framework TestSuite TestSuite

Introduction

In this page you can find the example usage for junit.framework TestSuite TestSuite.

Prototype

TestSuite

Source Link

Usage

From source file:com.networknt.light.rule.user.UserRuleTest.java

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTestSuite(UserRuleTest.class);
    return suite;
}

From source file:edu.ucsb.nceas.metacattest.UploadIPCCDataTest.java

/**
 * Create a suite of tests to be run together
 *///from   w ww .j a  v a  2  s  .  c  o m
public static Test suite() {
    TestSuite suite = new TestSuite();
    //suite.addTest(new UploadIPCCDataTest("modifyEMLDocsWithCorrectDataFileName"));
    //suite.addTest(new UploadIPCCDataTest("modifyEMLDocsWithIncorrectDataFileName"));
    return suite;
}

From source file:com.networknt.light.rule.form.FormRuleTest.java

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTestSuite(FormRuleTest.class);
    return suite;
}

From source file:com.networknt.light.server.handler.RestHandlerTest.java

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTestSuite(RestHandlerTest.class);
    return suite;
}

From source file:com.networknt.light.rule.catalog.CatalogRuleTest.java

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTestSuite(CatalogRuleTest.class);
    return suite;
}

From source file:com.networknt.light.rule.blog.BlogRuleTest.java

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTestSuite(BlogRuleTest.class);
    return suite;
}

From source file:org.callimachusproject.webdriver.helpers.BrowserFunctionalTestCase.java

public static TestSuite suite() throws Exception {
    return new TestSuite();
}

From source file:org.alfresco.repo.virtual.store.TypeVirtualizationMethodTest.java

public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTest(new JUnit4TestAdapter(Integration.class));
    suite.addTest(new JUnit4TestAdapter(Unit.class));
    return suite;
}

From source file:org.apache.asterix.test.aql.AQLTestSuite.java

public static Test suite() throws ParseException, UnsupportedEncodingException, FileNotFoundException {
    File testData = new File(AQLTS_PATH);
    File[] queries = testData.listFiles();
    TestSuite testSuite = new TestSuite();
    for (File file : queries) {
        if (file.isFile()) {
            testSuite.addTest(new AQLTestCase(file));
        }/*from  w ww  .  j av  a 2s .c  om*/
    }
    testData = new File(AQLTS_SQL_LIKE_PATH);
    queries = testData.listFiles();
    for (File file : queries) {
        if (file.isFile()) {
            testSuite.addTest(new AQLTestCase(file));
        }
    }
    return testSuite;
}

From source file:org.apache.ddlutils.io.RoundtripTestBase.java

/**
 * Creates the test suite for the given test class which must be a sub class of
 * {@link RoundtripTestBase}. If the platform supports it, it will be tested
 * with both delimited and undelimited identifiers.
 * /*from  ww w .  ja  va2 s.  c  o  m*/
 * @param testedClass The tested class
 * @return The tests
 */
protected static TestSuite getTests(Class testedClass) {
    if (!RoundtripTestBase.class.isAssignableFrom(testedClass)
            || Modifier.isAbstract(testedClass.getModifiers())) {
        throw new DdlUtilsException("Cannot create parameterized tests for class " + testedClass.getName());
    }

    TestSuite suite = new TestSuite();

    try {
        Method[] methods = testedClass.getMethods();
        PlatformInfo info = null;
        RoundtripTestBase newTest;

        for (int idx = 0; (methods != null) && (idx < methods.length); idx++) {
            if (methods[idx].getName().startsWith("test") && ((methods[idx].getParameterTypes() == null)
                    || (methods[idx].getParameterTypes().length == 0))) {
                newTest = (RoundtripTestBase) testedClass.newInstance();
                newTest.setName(methods[idx].getName());
                newTest.setUseDelimitedIdentifiers(false);
                suite.addTest(newTest);

                if (info == null) {
                    info = PlatformFactory.createNewPlatformInstance(newTest.getDatabaseName())
                            .getPlatformInfo();
                }
                if (info.isDelimitedIdentifiersSupported()) {
                    newTest = (RoundtripTestBase) testedClass.newInstance();
                    newTest.setName(methods[idx].getName());
                    newTest.setUseDelimitedIdentifiers(true);
                    suite.addTest(newTest);
                }
            }
        }
    } catch (Exception ex) {
        throw new DdlUtilsException(ex);
    }

    return suite;
}