use of org.wso2.carbon.identity.mgt.beans.VerificationBean in project product-is by wso2.
the class UserInformationRecoveryServiceTestCase method testVerifyUserAccount.
// @SetEnvironment(executionEnvironments = { ExecutionEnvironment.integration_all })
// @Test(groups = "wso2.is", description = "Check getting supported claims")
// public void testGetUserIdentitySupportedClaims() throws Exception {
// loginManger.login("admin", "admin", isServer.getBackEndUrl());
// UserIdentityClaimDTO[] bean = infoRecoveryClient.getUserIdentitySupportedClaims("http://wso2.org/claims");
// Assert.assertNotNull(bean, "Getting supported claims has failed with null return");
// }
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@Test(groups = "wso2.is", description = "Check user account verification", dependsOnMethods = "testVerifyUserChallengeAnswer")
public void testVerifyUserAccount() throws Exception {
UserIdentityClaimDTO[] claims = new UserIdentityClaimDTO[2];
UserIdentityClaimDTO claimEmail = new UserIdentityClaimDTO();
claimEmail.setClaimUri("http://wso2.org/claims/emailaddress");
claimEmail.setClaimValue("user11@wso2.com");
UserIdentityClaimDTO claimLastName = new UserIdentityClaimDTO();
claimLastName.setClaimUri("http://wso2.org/claims/givenname");
claimLastName.setClaimValue("user11");
claims[0] = claimEmail;
claims[1] = claimLastName;
VerificationBean bean = infoRecoveryClient.verifyAccount(claims, null, null);
Assert.assertNotNull(bean, "Verifying user account has failed with null return");
}
use of org.wso2.carbon.identity.mgt.beans.VerificationBean in project product-is by wso2.
the class UserInformationRecoveryServiceTestCase method testUpdatePassword.
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@Test(groups = "wso2.is", description = "Check update password", dependsOnMethods = "testVerifyConfirmationCode")
public void testUpdatePassword() throws Exception {
VerificationBean bean = infoRecoveryClient.updatePassword("user11", confKey, "passWord2@");
Assert.assertNotNull(bean, "Update password has failed with null return");
// Assert.assertNotNull(bean.getKey(), "Update password has failed with null key return");
// String value = loginManger.login("user11", "passWord2@", isServer.getBackEndUrl());
}
use of org.wso2.carbon.identity.mgt.beans.VerificationBean in project product-is by wso2.
the class UserInformationRecoveryServiceTestCase method testSendRecoveryNotification.
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@Test(groups = "wso2.is", description = "Check recovery notification sending", dependsOnMethods = "testVerifyUser")
public void testSendRecoveryNotification() throws Exception {
UserProfileDTO profile = profileClient.getUserProfile("user11", "default");
UserFieldDTO email = new UserFieldDTO();
email.setFieldValue("testuser@wso2.com");
email.setClaimUri("http://wso2.org/claims/emailaddress");
UserFieldDTO[] params = new UserFieldDTO[1];
params[0] = email;
profile.setFieldValues(params);
profileClient.setUserProfile("user11", profile);
VerificationBean bean = infoRecoveryClient.sendRecoveryNotification("user11", confKey, "EMAIL");
Assert.assertNotNull(bean, "Notification sending has failed with null return");
// Assert.assertTrue(bean.getVerified(), "Notification sending has failed for user11");
// confKey = bean.getKey();
}
use of org.wso2.carbon.identity.mgt.beans.VerificationBean in project product-is by wso2.
the class UserInformationRecoveryServiceTestCase method testRegisterUser.
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@Test(groups = "wso2.is", description = "Check user registration", dependsOnMethods = "testVerifyUserAccount")
public void testRegisterUser() throws Exception {
UserIdentityClaimDTO[] claims = new UserIdentityClaimDTO[2];
UserIdentityClaimDTO claimEmail = new UserIdentityClaimDTO();
claimEmail.setClaimUri("http://wso2.org/claims/emailaddress");
claimEmail.setClaimValue("user2@wso2.com");
UserIdentityClaimDTO claimLastName = new UserIdentityClaimDTO();
claimLastName.setClaimUri("http://wso2.org/claims/givenname");
claimLastName.setClaimValue("user2");
claims[0] = claimEmail;
claims[1] = claimLastName;
VerificationBean bean = infoRecoveryClient.registerUser("user2", "passWord1@", claims, "default", null);
Assert.assertNotNull(bean, "Registering user account has failed with null return");
confKey = bean.getKey();
}
use of org.wso2.carbon.identity.mgt.beans.VerificationBean in project product-is by wso2.
the class UserInformationRecoveryServiceTestCase method testRegisterUserWithEmptyUserName.
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@Test(groups = "wso2.is", description = "Check user registration validation with empty password", dependsOnMethods = "testRegisterUser")
public void testRegisterUserWithEmptyUserName() throws Exception {
UserIdentityClaimDTO[] claims = new UserIdentityClaimDTO[2];
UserIdentityClaimDTO claimEmail = new UserIdentityClaimDTO();
claimEmail.setClaimUri("http://wso2.org/claims/emailaddress");
claimEmail.setClaimValue("user2@wso2.com");
UserIdentityClaimDTO claimLastName = new UserIdentityClaimDTO();
claimLastName.setClaimUri("http://wso2.org/claims/givenname");
claimLastName.setClaimValue("user2");
claims[0] = claimEmail;
claims[1] = claimLastName;
VerificationBean bean = infoRecoveryClient.registerUser(null, "passWord1@", claims, "default", null);
Assert.assertNotNull(bean.getError(), "The expected error message is null with null return");
}
Aggregations