Search in sources :

Example 21 with TestPolicy

use of util.TestPolicy in project jdk8u_jdk by JetBrains.

the class SyncFactoryPermissionsTests method test07.

/*
     * Validate that AccessControlException is thrown if
     * SQLPermission("setSyncFactory")  and LoggingPermission("control", null)
     * have not been granted
     */
@Test(expectedExceptions = AccessControlException.class)
public void test07() throws Exception {
    setPolicy(new TestPolicy("setSyncFactory"));
    SyncFactory.setLogger(alogger, Level.INFO);
}
Also used : TestPolicy(util.TestPolicy) Test(org.testng.annotations.Test) BaseTest(util.BaseTest)

Aggregations

TestPolicy (util.TestPolicy)21 Test (org.testng.annotations.Test)19 BaseTest (util.BaseTest)19 StubDriver (util.StubDriver)3 BeforeClass (org.testng.annotations.BeforeClass)2