use of org.jboss.as.controller.security.ControllerPermission in project wildfly-core by wildfly.
the class ManagementPermissionCollectionTestCase method testAdd.
@Test
public void testAdd() {
try {
permissionCollection.add(new TestManagementPermission(Action.ActionEffect.ADDRESS));
} catch (Exception e) {
fail();
}
try {
permissionCollection.add(new AnotherTestManagementPermission(Action.ActionEffect.ADDRESS));
fail();
} catch (IllegalArgumentException ignored) {
/* expected */
}
try {
permissionCollection.add(new ControllerPermission("bad"));
fail();
} catch (IllegalArgumentException ignored) {
/* expected */
}
}
Aggregations