use of com.sun.identity.entitlement.ApplicationPrivilegeManager in project OpenAM by OpenRock.
the class ApplicationPrivilegeCLITest method removedApplicationPrivilege.
@Test(dependsOnMethods = "removeResources")
public void removedApplicationPrivilege() throws Exception {
String[] args = new String[5];
args[0] = "remove-app-privs";
args[1] = CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME;
args[2] = "/";
args[3] = CLIConstants.PREFIX_ARGUMENT_LONG + DeleteApplicationPrivilege.PARAM_NAMES;
args[4] = PRIVILEGE_NAME;
CLIRequest req = new CLIRequest(null, args, adminToken);
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
ApplicationPrivilegeManager apm = ApplicationPrivilegeManager.getInstance("/", adminSubject);
try {
apm.getPrivilege(PRIVILEGE_NAME);
} catch (EntitlementException ex) {
if (ex.getErrorCode() != 325) {
throw ex;
}
}
}
Aggregations