use of org.apache.jackrabbit.oak.spi.commit.MoveTracker in project jackrabbit-oak by apache.
the class ExternalPrincipalConfigurationTest method testGetValidators.
@Test
public void testGetValidators() {
ContentSession cs = root.getContentSession();
List<? extends ValidatorProvider> validatorProviders = principalConfiguration.getValidators(cs.getWorkspaceName(), cs.getAuthInfo().getPrincipals(), new MoveTracker());
assertFalse(validatorProviders.isEmpty());
assertEquals(1, validatorProviders.size());
assertTrue(validatorProviders.get(0) instanceof ExternalIdentityValidatorProvider);
validatorProviders = principalConfiguration.getValidators(cs.getWorkspaceName(), cs.getAuthInfo().getPrincipals(), new MoveTracker());
assertFalse(validatorProviders.isEmpty());
assertEquals(1, validatorProviders.size());
assertTrue(validatorProviders.get(0) instanceof ExternalIdentityValidatorProvider);
enable();
validatorProviders = principalConfiguration.getValidators(cs.getWorkspaceName(), cs.getAuthInfo().getPrincipals(), new MoveTracker());
assertFalse(validatorProviders.isEmpty());
assertEquals(1, validatorProviders.size());
assertTrue(validatorProviders.get(0) instanceof ExternalIdentityValidatorProvider);
}
Aggregations