Ejemplo n.º 1
0
        public void GivenHappyReturnSuccessfulForLastName(string message)
        {
            //Arrange
            UserRegister userRegister = new UserRegister(message);
            //Act
            var result = userRegister.checkLastName();

            //Assert
            Assert.AreEqual("Entry Successfull", result);
        }
Ejemplo n.º 2
0
 public void GivenLastNameThrowInvalidLastNameExceptionIfInvalid(string lname)
 {
     try
     {
         //Arrange
         UserRegister userRegister = new UserRegister();
         //Act
         userRegister.checkLastName(lname);
     }
     catch (UserRegistrationException e)
     {
         //Assert
         Assert.AreEqual("Last Name is Invalid", e.Message);
     }
 }