use of org.apache.derbyTesting.junit.SupportFilesSetup in project derby by apache.
the class XMLBindingTest method suite.
/**
* Return a suite that runs a set of XML binding tests. Only return
* such a suite IF the testing classpath has the required XML classes.
* Otherwise just return an empty suite.
*/
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("XML Binding Suite");
if (XML.classpathMeetsXMLReqs()) {
/* "false" in the next line means that we will *not* clean the
* database before the embedded and client suites. This ensures
* that we do not remove the objects created by XBindTestSetup.
*/
Test test = TestConfiguration.defaultSuite(XMLBindingTest.class, false);
test = new XBindTestSetup(test);
/* XML parser needs to read "personal.dtd" for schema-based
* insertion, so copy it to user directory.
*/
test = new SupportFilesSetup(test, new String[] { "functionTests/tests/lang/xmlTestFiles/personal.dtd" });
// JEP 185 (http://openjdk.java.net/jeps/185) in Java SE 8 added
// restrictions on access to external resources. This system
// property loosens the restriction so that the XML parser is
// allowed to read the DTD.
test = SystemPropertyTestSetup.singleProperty(test, "javax.xml.accessExternalDTD", "file");
suite.addTest(test);
}
return suite;
}
use of org.apache.derbyTesting.junit.SupportFilesSetup in project derby by apache.
the class Derby6884Test method baseSuite.
protected static Test baseSuite(String name) {
BaseTestSuite suite = new BaseTestSuite(name);
suite.addTestSuite(Derby6884Test.class);
Test test = suite;
test = new SupportFilesSetup(test);
return new CleanDatabaseTestSetup(test) {
protected void decorateSQL(Statement stmt) throws SQLException {
Connection conn = stmt.getConnection();
stmt.execute("CREATE TABLE DERBY_6884_TESTBLOB" + "(id BIGINT, content BLOB)");
stmt.execute("CREATE TABLE DERBY_6884_TESTCLOB" + "(id BIGINT, content CLOB)");
conn.commit();
}
};
}
use of org.apache.derbyTesting.junit.SupportFilesSetup in project derby by apache.
the class Changes10_7 method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Return the suite of tests to test the changes made in 10.7.
* @param phase an integer that indicates the current phase in
* the upgrade test.
* @return the test suite created.
*/
public static Test suite(int phase) {
BaseTestSuite suite = new BaseTestSuite("Upgrade test for 10.7");
suite.addTestSuite(Changes10_7.class);
return new SupportFilesSetup((Test) suite);
}
use of org.apache.derbyTesting.junit.SupportFilesSetup in project derby by apache.
the class Changes10_9 method suite.
/**
* Return the suite of tests to test the changes made in 10.7.
* @param phase an integer that indicates the current phase in
* the upgrade test.
* @return the test suite created.
*/
public static Test suite(int phase) {
BaseTestSuite suite = new BaseTestSuite("Upgrade test for 10.9");
suite.addTestSuite(Changes10_9.class);
return new SupportFilesSetup((Test) suite, SUPPORT_FILES_SOURCE);
}
use of org.apache.derbyTesting.junit.SupportFilesSetup in project derby by apache.
the class Changes10_10 method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Return the suite of tests to test the changes made in 10.10.
* @param phase an integer that indicates the current phase in
* the upgrade test.
* @return the test suite created.
*/
public static Test suite(int phase) {
BaseTestSuite suite = new BaseTestSuite("Upgrade test for 10.9");
suite.addTestSuite(Changes10_10.class);
return new SupportFilesSetup((Test) suite);
}
Aggregations