use of org.apache.jackrabbit.oak.security.user.RandomAuthorizableNodeName in project jackrabbit-oak by apache.
the class L14_AuthorizableNodeNameTest method testRandomAuthorizableNodeName.
@Test
public void testRandomAuthorizableNodeName() throws RepositoryException {
// EXERCISE: uncomment the setup in 'getSecurityConfigParameters' before running this test.
// verify that the configuration is correct:
AuthorizableNodeName configured = getUserConfiguration().getParameters().getConfigValue(UserConstants.PARAM_AUTHORIZABLE_NODE_NAME, AuthorizableNodeName.DEFAULT);
assertNotSame(AuthorizableNodeName.DEFAULT, configured);
assertTrue(configured instanceof RandomAuthorizableNodeName);
testUser = userManager.createUser("test/:User", null);
String nodeName = Text.getName(testUser.getPath());
// EXERCISE: write the correct assertion wrt the generated node name.
}
Aggregations