public void GivenHappyReturnSuccessfulForMobileNum(string message) { //Arrange UserRegister userRegister = new UserRegister(message); //Act var result = userRegister.checkMobileNumber(); //Assert Assert.AreEqual("Entry Successfull", result); }
public void GivenMobileNumberThrowInvalidMobileNumberExceptionIfInvalid(string mobNumber) { try { //Arrange UserRegister userRegister = new UserRegister(); //Act userRegister.checkMobileNumber(mobNumber); } catch (UserRegistrationException e) { //Assert Assert.AreEqual("Mobile number is Invalid", e.Message); } }