Search in sources :

Example 1 with DefinedPermissionSecurityManager

use of org.ff4j.test.DefinedPermissionSecurityManager in project ff4j by ff4j.

the class AuditBeanTest method testEventBuider.

@Test
public void testEventBuider() {
    FF4j ff4j = new FF4j();
    ff4j.setAuthorizationsManager(new DefinedPermissionSecurityManager("a", Util.set("1", "2")));
    EventBuilder eb = new EventBuilder(ff4j);
    eb.name("FeatureX");
    Assert.assertEquals("a", eb.build().getUser());
}
Also used : EventBuilder(org.ff4j.audit.EventBuilder) FF4j(org.ff4j.FF4j) DefinedPermissionSecurityManager(org.ff4j.test.DefinedPermissionSecurityManager) Test(org.junit.Test)

Aggregations

FF4j (org.ff4j.FF4j)1 EventBuilder (org.ff4j.audit.EventBuilder)1 DefinedPermissionSecurityManager (org.ff4j.test.DefinedPermissionSecurityManager)1 Test (org.junit.Test)1