use of org.apache.jackrabbit.oak.spi.security.SecurityConfiguration in project jackrabbit-oak by apache.
the class InternalSecurityProviderTest method testSetPrivilegeConfiguration.
@Test
public void testSetPrivilegeConfiguration() {
PrivilegeConfiguration pc = Mockito.mock(PrivilegeConfiguration.class);
when(pc.getParameters()).thenReturn(PARAMS);
securityProvider.setPrivilegeConfiguration(pc);
assertSame(pc, securityProvider.getConfiguration(PrivilegeConfiguration.class));
for (SecurityConfiguration sc : securityProvider.getConfigurations()) {
if (sc instanceof PrivilegeConfiguration) {
assertSame(pc, sc);
}
}
assertEquals(PARAMS, securityProvider.getParameters(PrivilegeConfiguration.NAME));
}
use of org.apache.jackrabbit.oak.spi.security.SecurityConfiguration in project jackrabbit-oak by apache.
the class InternalSecurityProviderTest method testSetUserConfiguration.
@Test
public void testSetUserConfiguration() {
UserConfiguration uc = Mockito.mock(UserConfiguration.class);
when(uc.getParameters()).thenReturn(PARAMS);
securityProvider.setUserConfiguration(uc);
assertSame(uc, securityProvider.getConfiguration(UserConfiguration.class));
for (SecurityConfiguration sc : securityProvider.getConfigurations()) {
if (sc instanceof UserConfiguration) {
assertSame(uc, sc);
}
}
assertEquals(PARAMS, securityProvider.getParameters(UserConfiguration.NAME));
}
Aggregations