private void checkProfile(final DefaultRolesPermissionsAuthorizationGenerator generator) { final CommonProfile profile = new CommonProfile(); generator.generate(profile); final Set<String> roles = profile.getRoles(); assertEquals(2, roles.size()); assertTrue(roles.containsAll(DEFAULT_ROLES_LIST)); final Set<String> permissions = profile.getPermissions(); assertEquals(2, permissions.size()); assertTrue(permissions.containsAll(DEFAULT_PERMISSIONS_LIST)); }
private void checkEmptyProfile(final DefaultRolesPermissionsAuthorizationGenerator generator) { final CommonProfile profile = new CommonProfile(); generator.generate(profile); assertEquals(0, profile.getRoles().size()); assertEquals(0, profile.getPermissions().size()); }