use of org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName in project product-is by wso2.
the class UserMgtTestCase method testAddRole.
@Test(groups = "wso2.is", description = "Check role addition")
public void testAddRole() throws Exception {
userMgtClient.addRole("loginRole", new String[] { "testAdminUser" }, new String[] { "/permission/admin/login" }, false);
FlaggedName[] roles = userMgtClient.getRolesOfUser("testAdminUser", "loginRole", -1);
Boolean isIncluded = false;
for (FlaggedName role : roles) {
if (role.getItemName().equalsIgnoreCase("loginRole")) {
isIncluded = true;
}
}
Assert.assertTrue(isIncluded, "Added role with user 'testAdminUser' could not be retrieved.");
}
use of org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName in project product-is by wso2.
the class UserMgtTestCase method testListUserByClaim.
@Test(groups = "wso2.is", description = "Check list users by claim value")
public void testListUserByClaim() throws Exception {
ClaimValue claimValue = new ClaimValue();
claimValue.setClaimURI("http://wso2.org/claims/lastname");
claimValue.setValue("user3");
FlaggedName[] allNames = userMgtClient.listUserByClaim(claimValue, "user*", 10);
Assert.assertTrue(nameExists(allNames, "user3"), "List user with claim value has failed");
}
use of org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName in project product-is by wso2.
the class SCIMServiceProviderUserTestCase method isUserExists.
private boolean isUserExists() throws Exception {
boolean userExists = false;
FlaggedName[] nameList = userMgtClient.listAllUsers(USERNAME, 100);
for (FlaggedName name : nameList) {
if (name.getItemName().contains(USERNAME)) {
userExists = true;
}
}
return userExists;
}
use of org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName in project product-is by wso2.
the class SCIMServiceProviderUserTestCase method isAllUsersExists.
private boolean isAllUsersExists(String response) throws Exception {
boolean usersExists = false;
FlaggedName[] nameList = userMgtClient.listAllUsers(USERNAME, 100);
for (FlaggedName name : nameList) {
if (response.contains(name.getItemName())) {
usersExists = true;
}
}
return usersExists;
}
use of org.wso2.carbon.user.mgt.stub.types.carbon.FlaggedName in project product-is by wso2.
the class IDENTITY4776SCIMServiceWithOAuthTestCase method isUserExists.
private boolean isUserExists() throws Exception {
boolean userExists = false;
FlaggedName[] nameList = userMgtClient.listAllUsers(SCIM_USER_NAME, 100);
for (FlaggedName name : nameList) {
if (name.getItemName().contains(SCIM_USER_NAME)) {
userExists = true;
}
}
return userExists;
}
Aggregations