use of util.TestPolicy in project jdk8u_jdk by JetBrains.
the class DriverManagerPermissionsTests method test8.
/*
* Validate that deregisterDriver succeeds if
* SQLPermission("deregisterDriver") has been granted
*/
@Test
public void test8() throws SQLException {
setPolicy(new TestPolicy("deregisterDriver"));
DriverManager.deregisterDriver(new StubDriver());
}
use of util.TestPolicy in project jdk8u_jdk by JetBrains.
the class DriverManagerPermissionsTests method test2.
/*
* Validate that setLogStream succeeds if AllPermissions has been granted
*/
@Test
public void test2() {
setPolicy(new TestPolicy("all"));
DriverManager.setLogStream(null);
}
use of util.TestPolicy in project jdk8u_jdk by JetBrains.
the class DriverManagerPermissionsTests method test1.
/*
* Validate that setLogStream succeeds if SQLPermission("setLog") has been
* granted
*/
@Test
public void test1() {
Policy.setPolicy(new TestPolicy("setLog"));
DriverManager.setLogStream(null);
}
use of util.TestPolicy in project jdk8u_jdk by JetBrains.
the class SyncFactoryPermissionsTests method setUpClass.
/*
* Install a SeeurityManager along with a base Policy to allow testNG to run
*/
@BeforeClass
public static void setUpClass() throws Exception {
setPolicy(new TestPolicy());
System.setSecurityManager(new SecurityManager());
}
use of util.TestPolicy in project jdk8u_jdk by JetBrains.
the class SyncFactoryPermissionsTests method test05.
/*
* Validate that setLogger succeeds if AllPermissions has been granted
*/
@Test
public void test05() throws Exception {
setPolicy(new TestPolicy("all"));
SyncFactory.setLogger(alogger);
}
Aggregations