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:org.bresearch.websec.test.CommonsMathTest.java

public static void main(String args[]) {

    TestSuite suite = new TestSuite();
    suite.addTestSuite(CommonsMathTest.class);

    TestRunner.run(suite);/*from www.ja v a  2  s.c  om*/
    return;
}

From source file:org.eclipse.mylyn.reviews.r4e.ui.tests.feature.UpgradeVersionTests.java

/**
 * @return Test the test suite/*from w  w  w  .  ja  v  a2s.c  o m*/
 */
public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTestSuite(UpgradeVersionTests.class);
    return suite;
}

From source file:org.ecoinformatics.emltest.SaxValidateTest.java

/**
 * Create a suite of tests to be run together
 *
 * @return   The test suite//from ww  w.j a  va2  s  .com
 */
public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTest(new SaxValidateTest("initialize"));
    suite.addTest(new SaxValidateTest("testSchemaValid"));
    suite.addTest(new SaxValidateTest("testDocbook"));
    return suite;
}

From source file:org.ecoinformatics.seek.ecogrid.EcoGridServicesControllerTest.java

/**
 * Create a suite of tests to be run together
 *///from w  w w  . ja  v  a  2  s.  c o  m
public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTest(new EcoGridServicesControllerTest("initialize"));
    suite.addTest(new EcoGridServicesControllerTest("getDomain"));
    //suite.addTest(new EcoGridServicesControllerTest("addServiceTest"));
    //suite.addTest(new EcoGridServicesControllerTest("updateServiceTest"));
    //suite.addTest(new EcoGridServicesControllerTest("removeServiceTest"));
    return suite;
}

From source file:org.jboss.test.compatibility.test.SerialVersionUIDUnitTestCase.java

public static Test suite() throws Exception {
    // JBAS-3600, the execution order of tests in this test case is important
    // so it must be defined explicitly when running under some JVMs
    TestSuite suite = new TestSuite();
    suite.addTest(new SerialVersionUIDUnitTestCase("test423Compatibility"));
    suite.addTest(new SerialVersionUIDUnitTestCase("test500Compatibility"));
    suite.addTest(new SerialVersionUIDUnitTestCase("test501Compatibility"));
    suite.addTest(new SerialVersionUIDUnitTestCase("testJavaEE50Compatibility"));

    return suite;
}

From source file:org.jboss.test.security.test.authorization.ACLIntegrationUnitTestCase.java

public static Test suite() throws Exception {
    TestSuite suite = new TestSuite();
    suite.addTest(new TestSuite(ACLIntegrationUnitTestCase.class));

    TestSetup wrapper = new JBossTestSetup(suite) {
        /*//w w w.j  a  va2 s  .co m
         * (non-Javadoc)
         * 
         * @see org.jboss.test.JBossTestSetup#setUp()
         */
        @Override
        protected void setUp() throws Exception {
            super.setUp();
            // deploy the application policy that specifies an ACL module.
            String url = getResourceURL("security/authorization/aclpolicy-jboss-beans.xml");
            deploy(url);
            // deploy the web application that calls the ACL module.
            deploy("acl-integration.war");
            // deploy the ejb application that calls the ACL module.
            deploy("acl-integration.jar");
        }

        /*
         * (non-Javadoc)
         * 
         * @see org.jboss.test.JBossTestSetup#tearDown()
         */
        @Override
        protected void tearDown() throws Exception {
            // undeploy the test ejb application.
            undeploy("acl-integration.jar");
            // undeploy the test web application.
            undeploy("acl-integration.war");
            // undeploy the application policy.
            String url = getResourceURL("security/authorization/aclpolicy-jboss-beans.xml");
            undeploy(url);
            super.tearDown();
        }
    };
    return wrapper;
}

From source file:org.jboss.test.security.test.CustomPrincipalPropagationUnitTestCase.java

/**
 * Setup the test suite.// w w w.j  a v  a2 s  .  c  om
 */
public static Test suite() throws Exception {
    TestSuite suite = new TestSuite();
    suite.addTest(new TestSuite(CustomPrincipalPropagationUnitTestCase.class));

    // Create an initializer for the test suite
    TestSetup wrapper = new JBossTestSetup(suite) {
        protected void setUp() throws Exception {
            super.setUp();
            Configuration.setConfiguration(new XMLLoginConfigImpl());
            deploy("security-jaas.ear");
            flushAuthCache("jaas-test");
            flushAuthCache("jaas-testpropagation");
        }

        protected void tearDown() throws Exception {
            undeploy("security-jaas.ear");
            super.tearDown();

        }
    };
    return wrapper;
}

From source file:org.jboss.test.security.test.mapping.RoleMappingWebTestCase.java

public static Test suite() throws Exception {
    TestSuite suite = new TestSuite();
    suite.addTest(new TestSuite(RoleMappingWebTestCase.class));

    // Create an initializer for the test suite
    Test wrapper = new JBossTestSetup(suite) {
        protected void setUp() throws Exception {
            super.setUp();
            deploy(getResourceURL("security-spi/rolemapping/rolemapping-test-service.xml"));
            deploy("web-role-map.war");
        }/*from   www  .  j  a  va2  s . com*/

        protected void tearDown() throws Exception {
            undeploy(getResourceURL("security-spi/rolemapping/rolemapping-test-service.xml"));
            undeploy("web-role-map.war");
            super.tearDown();
        }
    };
    return wrapper;
}

From source file:org.jboss.test.security.test.SecurityDomainTolerateUnitTestCase.java

/**
 * Setup the test suite./*from  w  ww  .ja  va  2 s.com*/
 */
public static Test suite() throws Exception {
    TestSuite suite = new TestSuite();
    suite.addTest(new TestSuite(SecurityDomainTolerateUnitTestCase.class));

    // Create an initializer for the test suite
    TestSetup wrapper = new JBossTestSetup(suite) {
        @Override
        protected void setUp() throws Exception {
            super.setUp();
            Configuration.setConfiguration(XMLLoginConfigImpl.getInstance());
            redeploy("sdtolerate.ear");
            redeploy(getResourceURL(login_config));
            flushAuthCache();
        }

        @Override
        protected void tearDown() throws Exception {
            undeploy(getResourceURL(login_config));
            undeploy("sdtolerate.ear");
            super.tearDown();
        }
    };
    return wrapper;
}