Java Code Examples for junit.framework.TestSuite#addTestSuite()

The following examples show how to use junit.framework.TestSuite#addTestSuite() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PrepStmtNullTest.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
private static Test baseSuite(String name) {
    TestSuite suite = new TestSuite(name);

    suite.addTestSuite(PrepStmtNullTest.class);

    return new CleanDatabaseTestSetup(suite) {
        /**
         * Creates the tables used in the test
         * cases.
         *
         * @exception SQLException if a database error occurs
         */
        protected void decorateSQL(Statement stmt) throws SQLException {

            /**
             * Creates the table used in the test cases.
             *
             */
            stmt.execute("create table nullTS(name varchar(10), ts timestamp)");
            stmt.executeUpdate("create table nullBlob(name varchar(10), bval blob(16K))");
            stmt.executeUpdate("create table ClobBlob(cval clob, bval blob(16K))");
        }
    };
}
 
Example 2
Source File: DBInJarTest.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
protected static Test baseSuite(String name) {
    TestSuite suite = new TestSuite(name);
    suite.addTestSuite(DBInJarTest.class);
    // Don't run with security manager, we need access to user.dir to archive
    // the database.
    return new CleanDatabaseTestSetup(SecurityManagerSetup.noSecurityManager(suite)) 
    {
        /**
         * Creates the procedure used in the test cases.
         * @exception SQLException if a database error occurs
         */
        protected void decorateSQL(Statement stmt) throws SQLException
        {
            stmt.execute("create procedure CREATEARCHIVE(jarName VARCHAR(20)" +
                    " , path VARCHAR(20), dbName VARCHAR(20))" +
                    " LANGUAGE JAVA PARAMETER STYLE JAVA" +
                    " NO SQL" +
                    " EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.dbjarUtil.createArchive'");
            
            
        }
    };
}
 
Example 3
Source File: LocaleConvertTestSuite.java    From commons-beanutils with Apache License 2.0 6 votes vote down vote up
/**
 * Return the tests included in this test suite.
 */
public static Test suite() {
    final TestSuite testSuite = new TestSuite();
    testSuite.addTestSuite(LocaleConvertUtilsTestCase.class);
    testSuite.addTestSuite(LocaleBeanificationTestCase.class);
    testSuite.addTestSuite(BigDecimalLocaleConverterTestCase.class);
    testSuite.addTestSuite(BigIntegerLocaleConverterTestCase.class);
    testSuite.addTestSuite(ByteLocaleConverterTestCase.class);
    testSuite.addTestSuite(DateLocaleConverterTestCase.class);
    testSuite.addTestSuite(DoubleLocaleConverterTestCase.class);
    testSuite.addTestSuite(FloatLocaleConverterTestCase.class);
    testSuite.addTestSuite(IntegerLocaleConverterTestCase.class);
    testSuite.addTestSuite(LongLocaleConverterTestCase.class);
    testSuite.addTestSuite(ShortLocaleConverterTestCase.class);
    return testSuite;
}
 
Example 4
Source File: BatchUpdateTest.java    From gemfirexd-oss with Apache License 2.0 6 votes vote down vote up
protected static Test baseSuite(String name) {
    TestSuite suite = new TestSuite(name);
    suite.addTestSuite(BatchUpdateTest.class);
    return new CleanDatabaseTestSetup(
            DatabasePropertyTestSetup.setLockTimeouts(suite, 2, 4))
    {
        /**
         * Creates the tables used in the test cases.
         * @exception SQLException if a database error occurs
         */
        protected void decorateSQL(Statement stmt) throws SQLException
        {
            stmt.execute("create table t1(c1 int)");
            // for fixture testCallableStatementBatch
            stmt.execute("create table datetab(c1 date)");
            stmt.execute("create table timetab(c1 time)");
            stmt.execute("create table timestamptab(c1 timestamp)");
            stmt.execute("create table usertypetab(c1 DATE)");
            // for fixture testAssociatedParams
            stmt.execute("create table assoc" +
                "(x char(10) not null primary key, y char(100))");
            stmt.execute("create table assocout(x char(10))");
        }
    };
}
 
Example 5
Source File: DateTimeTest.java    From spliceengine with GNU Affero General Public License v3.0 6 votes vote down vote up
protected static Test baseSuite(String name) {
    TestSuite suite = new TestSuite(name);
    suite.addTestSuite(DateTimeTest.class);
    return new CleanDatabaseTestSetup(suite) {
        /**
         * Creates the tables used in the test cases.
         * @exception SQLException if a database error occurs
         */
        protected void decorateSQL(Statement stmt) throws SQLException {
            createTableForArithmeticTest(stmt);
            createTableForSyntaxTest(stmt);
            createTableForConversionTest(stmt);
            createTableForISOFormatTest(stmt);
        }
    };
}
 
Example 6
Source File: BatchUpdateTest.java    From spliceengine with GNU Affero General Public License v3.0 6 votes vote down vote up
protected static Test baseSuite(String name) {
    TestSuite suite = new TestSuite(name);
    suite.addTestSuite(BatchUpdateTest.class);
    return new CleanDatabaseTestSetup(
            DatabasePropertyTestSetup.setLockTimeouts(suite, 2, 4)) 
    {
        /**
         * Creates the tables used in the test cases.
         * @exception SQLException if a database error occurs
         */
        protected void decorateSQL(Statement stmt) throws SQLException
        {
            stmt.execute("create table t1(c1 int)");
            // for fixture testCallableStatementBatch
            stmt.execute("create table datetab(c1 date)");
            stmt.execute("create table timetab(c1 time)");
            stmt.execute("create table timestamptab(c1 timestamp)");
            stmt.execute("create table usertypetab(c1 DATE)");
            // for fixture testAssociatedParams
            stmt.execute("create table assoc" +
                "(x char(10) not null primary key, y char(100))");
            stmt.execute("create table assocout(x char(10))");
        }
    };
}
 
Example 7
Source File: AllCoreTests.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @return the test
 */

public static Test suite( )
{
	TestSuite test = new TestSuite( );

	// add all test classes here
	test.addTestSuite( DesignElementCloneForTemplateTest.class );
	test.addTestSuite( DesignElementCloneTest.class );
	test.addTestSuite( DesignElementCopyPropertyToTest.class );
	test.addTestSuite( DesignElementPropsTest.class );
	test.addTestSuite( DesignElementTest.class );
	test.addTestSuite( DesignSessionTest.class );
	test.addTestSuite( ModuleTest.class );
	test.addTestSuite( MultiElementSlotTest.class );
	test.addTestSuite( NameHelperTest.class );
	test.addTestSuite( NameSpaceTest.class );
	test.addTestSuite( ParameterNameTest.class );
	test.addTestSuite( PropertyStructureCloneTest.class );
	test.addTestSuite( SingleElementSlotTest.class );
	test.addTestSuite( StructRefTest.class );
	test.addTestSuite( StructureTest.class );
	test.addTestSuite( StyledElementTest.class );
	test.addTestSuite( StyleElementTest.class );
	test.addTestSuite( StyleNameTest.class );

	return test;
}
 
Example 8
Source File: AllDeTests.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @return the test
 */

public static Test suite( )
{
	TestSuite test = new TestSuite( );

	test.addTestSuite( CrosstabItemFactoryTest.class );
	test.addTestSuite( CrosstabViewHandleTest.class );
	test.addTestSuite( MeasureViewHandleTest.class );

	// add all test classes here

	return test;
}
 
Example 9
Source File: AllTests.java    From oval with Eclipse Public License 2.0 5 votes vote down vote up
private static void guardTests(final TestSuite suite) {
   suite.addTestSuite(net.sf.oval.test.guard.AddingChecksTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.ApplyFieldConstraintsToConstructorsTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.ApplyFieldConstraintsToParametersTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.ApplyFieldConstraintsToSettersTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.ChainedConstructorsTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.ConstraintSetTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.CustomConstraintMessageTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.ExceptionTranslatorTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.GuardingWithoutGuardedAnnotationTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.InheritanceTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.InnerClassTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.MethodReturnValueConstraintsValidationTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.NullableTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.OverridingEqualsTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.OverridingHashCodeTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.ParameterConstraintsTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.PrePostBeanShellTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.PrePostGroovyTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.PrePostJavascriptTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.PrePostJEXLTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.PrePostMVELTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.PrePostOGNLTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.PrePostRubyTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.PrePostValidateThisTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.ProbeModeTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.StaticMethodsTest.class);
   suite.addTestSuite(net.sf.oval.test.guard.XMLConfigurationTest.class);
}
 
Example 10
Source File: OSReadOnlyTest.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
protected static Test baseSuite(String name) 
{
    TestSuite readonly = new TestSuite("OSReadOnly");
    TestSuite suite = new TestSuite(name);
    readonly.addTestSuite(OSReadOnlyTest.class);
    suite.addTest(TestConfiguration.singleUseDatabaseDecorator(newCleanDatabase(readonly)));
    
    return suite;
}
 
Example 11
Source File: StatementJdbc30Test.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
private static Test baseSuite(String name) {
    TestSuite suite = new TestSuite(name);

    suite.addTestSuite(StatementJdbc30Test.class);

    if  (name.equals(CLIENT_SUITE_NAME)) {
        // These test CAN be run in embedded mode as well, but
        // they're only meaningful in c/s mode and also take quite
        // a bit of time to run.
        suite.addTest(new StatementJdbc30Test
                      ("xtestMultiExecWithQueryTimeout"));
        suite.addTest(new StatementJdbc30Test
                      ("xtestMaxOpenStatementsWithQueryTimeout"));
    }

    return new CleanDatabaseTestSetup(suite) {
        /**
         * Creates the tables used in the test cases.
         * 
         * @exception SQLException
         *                if a database error occurs
         */
        protected void decorateSQL(Statement stmt) throws SQLException {

            /**
             * Creates the table used in the test cases.
             * 
             */
            stmt.execute("create table tab1 (i int, s smallint, r real)");
            stmt.executeUpdate("insert into tab1 values(1, 2, 3.1)");
        }
    };
}
 
Example 12
Source File: ProcedureTest.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Creates the test suite and wraps it in a <code>TestSetup</code>
 * instance which sets up and tears down the test environment.
 * @return test suite
 */
private static Test baseSuite(String name)
{
    TestSuite suite = new TestSuite(name);
    
    // Need JDBC DriverManager to run these tests
    if (!JDBC.vmSupportsJDBC3())
        return suite;
    
    suite.addTestSuite(ProcedureTest.class);
    
    return new CleanDatabaseTestSetup(suite) {
        /**
         * Creates the tables and the stored procedures used in the test
         * cases.
         * @exception SQLException if a database error occurs
         */
        protected void decorateSQL(Statement s) throws SQLException
        {
            for (int i = 0; i < PROCEDURES.length; i++) {
                s.execute(PROCEDURES[i]);
            }
            for (int i = 0; i < TABLES.length; i++) {
                s.execute(TABLES[i][1]);
            }
        }
    };
}
 
Example 13
Source File: AllTests.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
public static Test suite() {
  TestSuite s = new TestSuite();
  s.addTestSuite(PicoContainerExample.class);
  s.addTestSuite(RenderEngineExample.class);
  s.addTestSuite(MyRenderEngineExample.class);
  s.addTestSuite(MacroExample.class);
  s.addTestSuite(FilterExample.class);
   return s;
}
 
Example 14
Source File: LobStreamsTest.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Run with DerbyNetClient only.
 * Embedded Clob/Blob.setXXXStream() methods are not implemented.
 */
public static Test suite() {
            
    TestSuite ts  = new TestSuite ("LobStreamsTest");
    ts.addTest(TestConfiguration.defaultSuite (LobStreamsTest.class));
    // JSR169 does not have support for encryption
    if (JDBC.vmSupportsJDBC3()) {
        TestSuite encSuite = new TestSuite ("LobStreamsTest:encrypted");
        encSuite.addTestSuite (LobStreamsTest.class);
        ts.addTest(Decorator.encryptedDatabase (encSuite));
    }
    return ts;
}
 
Example 15
Source File: AllTests.java    From oopsla15-artifact with Eclipse Public License 1.0 5 votes vote down vote up
private static void addReferenceTests(TestSuite suite) {
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestAnnotations.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestBasicValues.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestEquality.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestList.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestListRelation.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestMap.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestRandomValues.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestRelation.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestSet.class);
	suite.addTestSuite(org.eclipse.imp.pdb.test.reference.TestValueFactory.class);
}
 
Example 16
Source File: RelativeTest.java    From spliceengine with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * Base suite of tests that will run in both embedded and client.
 * 
 * @param name
 *            Name for the suite.
 */
private static Test baseSuite(String name) {
	TestSuite suite = new TestSuite(name);
	suite.addTestSuite(RelativeTest.class);
	return new CleanDatabaseTestSetup(DatabasePropertyTestSetup
			.setLockTimeouts(suite, 2, 4)) {

		/**
		 * Creates the tables used in the test cases.
		 * 
		 * @exception SQLException
		 *                if a database error occurs
		 */
		protected void decorateSQL(Statement stmt) throws SQLException {
			stmt.execute("create table testRelative("
					+ "name varchar(10), i int)");

			stmt.execute("insert into testRelative values ("
					+ "'work1', NULL)");
			stmt.execute("insert into testRelative values ("
					+ "'work2', NULL)");
			stmt.execute("insert into testRelative values ("
					+ "'work3', NULL)");
			stmt.execute("insert into testRelative values ("
					+ "'work4', NULL)");
		}
	};
}
 
Example 17
Source File: AllFormatTests.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @return the test
 */

public static Test suite( )
{
	TestSuite test = new TestSuite( );

	test.addTestSuite( DateFormatterTest.class );
	test.addTestSuite( NumberFormatterTest.class );
	test.addTestSuite( StringFormatterTest.class );

	return test;
}
 
Example 18
Source File: AllUtilTests.java    From birt with Eclipse Public License 1.0 3 votes vote down vote up
/**
 * @return the test
 */

public static Test suite( )
{
	TestSuite test = new TestSuite( );

	test.addTestSuite( CrosstabUtilTest.class );

	// add all test classes here

	return test;
}
 
Example 19
Source File: AllWriterTests.java    From birt with Eclipse Public License 1.0 3 votes vote down vote up
/**
 * @return the test
 */

public static Test suite( )
{
	TestSuite test = new TestSuite( );

	test.addTestSuite( DesignWriterTest.class );
	test.addTestSuite( DocumentUtilTest.class );

	// add all test classes here

	return test;
}
 
Example 20
Source File: AllUtilTests.java    From birt with Eclipse Public License 1.0 3 votes vote down vote up
/**
 * @return the test
 */

public static Test suite( )
{
	TestSuite test = new TestSuite( );

	test.addTestSuite( ParameterValueUtilTest.class );

	// add all test classes here

	return test;
}