use of org.apache.derbyTesting.junit.LocaleTestSetup in project derby by apache.
the class LuceneSupportPermsTest method suite.
// /////////////////////////////////////////////////////////////////////////////////
//
// JUnit BEHAVIOR
//
// /////////////////////////////////////////////////////////////////////////////////
/**
* Construct top level suite in this JUnit test
*/
public static Test suite() {
String luceneVersion = getSystemProperty(LUCENE_VERSION_PROPERTY);
if (luceneVersion != null) {
LUCENE_VERSION = luceneVersion;
}
BaseTestSuite suite = (BaseTestSuite) TestConfiguration.embeddedSuite(LuceneSupportPermsTest.class);
Test secureTest = new SecurityManagerSetup(suite, POLICY_FILE);
Test authenticatedTest = DatabasePropertyTestSetup.builtinAuthentication(secureTest, LEGAL_USERS, "LuceneSupportPermissions");
Test authorizedTest = TestConfiguration.sqlAuthorizationDecoratorSingleUse(authenticatedTest, DB_NAME, true);
Test localizedTest = new LocaleTestSetup(authorizedTest, new Locale(LANGUAGE, COUNTRY));
return localizedTest;
}
use of org.apache.derbyTesting.junit.LocaleTestSetup in project derby by apache.
the class ErrorCodeTest method suite.
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("errorcode Test");
suite.addTest(TestConfiguration.defaultSuite(ErrorCodeTest.class));
return new LocaleTestSetup(suite, Locale.ENGLISH);
}
use of org.apache.derbyTesting.junit.LocaleTestSetup in project derby by apache.
the class XMLXXETest method suite.
/**
* Only return 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 XXE Vulnerability tests\n");
if (!XML.classpathMeetsXMLReqs())
return suite;
String[] testFiles = new String[] { "functionTests/tests/lang/xmlOptimizerXXE1Payload.trace", "functionTests/tests/lang/xmlOptimizerXXE1.trace", "functionTests/tests/lang/xmlOptimizerXXE2.trace" };
suite.addTest(new SupportFilesSetup(TestConfiguration.defaultSuite(XMLXXETest.class), testFiles));
// which may be different in different locales (DERBY-6869).
return new LocaleTestSetup(SecurityManagerSetup.noSecurityManager(suite), Locale.US);
}
use of org.apache.derbyTesting.junit.LocaleTestSetup in project derby by apache.
the class UrlLocaleTest method suite.
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite();
suite.addTestSuite(UrlLocaleTest.class);
suite.addTest(new LocaleTestSetup(new UrlLocaleTest("messageLocale_unknown"), new Locale("rr", "TT")));
suite.addTest(new LocaleTestSetup(new UrlLocaleTest("messageLocale_Germany"), Locale.GERMANY));
Test tsuite = new CleanDatabaseTestSetup(suite) {
/**
* Creates the table used in the test cases.
*/
protected void decorateSQL(Statement s) throws SQLException {
createLocaleProcedures(s.getConnection());
}
};
tsuite = new SupportFilesSetup(tsuite);
return tsuite;
}
use of org.apache.derbyTesting.junit.LocaleTestSetup in project derby by apache.
the class LuceneSupportTest method suite.
public static Test suite() {
BaseTestSuite suite = new BaseTestSuite("LuceneSupportTest");
Test baseTest = TestConfiguration.embeddedSuite(LuceneSupportTest.class);
Test singleUseTest = TestConfiguration.singleUseDatabaseDecorator(baseTest);
Test localizedTest = new LocaleTestSetup(singleUseTest, new Locale("en", "US"));
suite.addTest(SecurityManagerSetup.noSecurityManager(localizedTest));
return suite;
}
Aggregations