suite.addTest(
new SystemPrivilegesPermissionTest("testSystemPermission"));
// the DatabasePermission test attempts to canonicalize various
// directory path names and requires an all-files-read-permission,
// which is not granted by default derby_tests.policy
suite.addTest(new SecurityManagerSetup(
new SystemPrivilegesPermissionTest("testDatabasePermission"),
POLICY_FILE_NAME1));
// add authorization tests for security permissions; requires
// class javax.security.auth.Subject, which is not available
// on all JVM platforms
if (SecurityManagerSetup.JVM_HAS_SUBJECT_AUTHORIZATION) {
suite.addTest(new SecurityManagerSetup(
new SystemPrivilegesPermissionTest("policyTestSystemPermissionGrants"),
POLICY_FILE_NAME));
suite.addTest(new SecurityManagerSetup(
new SystemPrivilegesPermissionTest("policyTestDatabasePermissionGrants"),
POLICY_FILE_NAME));
}
// We need to manipulate private and final fields in order to test