use of org.wso2.carbon.automation.engine.annotations.SetEnvironment in project product-is by wso2.
the class UserInformationRecoveryServiceTestCase method testRegisterUserWithInvalidClaims.
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@Test(groups = "wso2.is", description = "Check user registration validation with Invalid Claims", dependsOnMethods = "testRegisterUser")
public void testRegisterUserWithInvalidClaims() throws Exception {
VerificationBean bean = infoRecoveryClient.registerUser(null, "passWord1@", null, "default", null);
Assert.assertNotNull(bean.getError(), "The expected error message is null with null return");
}
use of org.wso2.carbon.automation.engine.annotations.SetEnvironment in project product-is by wso2.
the class UserInformationRecoveryServiceTestCase method testRegisterExistingUser.
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@Test(groups = "wso2.is", description = "Check existing user registration validation", dependsOnMethods = "testRegisterUser")
public void testRegisterExistingUser() 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.getError(), "The expected error message is null with null return");
}
use of org.wso2.carbon.automation.engine.annotations.SetEnvironment in project product-is by wso2.
the class UserInformationRecoveryServiceTestCase method testVerifyUser.
/*
* To validate password reset without captcha validation is to follow the method calls as
* verifyUser() -> sendRecoveryNotification() -> verifyConfirmationCode() -> updatePassword()
* Since cannot answer the question the test need to carryout with Captcha.Verification.Internally.Managed=false
*/
@SetEnvironment(executionEnvironments = { ExecutionEnvironment.ALL })
@Test(groups = "wso2.is", description = "Check verify user", dependsOnMethods = "testGetCaptcha")
public void testVerifyUser() throws Exception {
VerificationBean bean = infoRecoveryClient.verifyUser("user11", null);
Assert.assertNotNull(bean, "Verify User has failed with null return");
// Assert.assertTrue(bean.getVerified(), "Verify User has failed for user11");
// Assert.assertNotNull(bean.getKey(), "Verify User has failed with null key return");
confKey = bean.getKey();
}
Aggregations