public void givenPassWord_WhenWithOutUpperCase_ShouldReturnFalse() { try { bool result = validations.passWord_Validation("bhagyalaxmi"); } catch (UserRegistrationExceptions e) { Assert.AreEqual("password should have atleast one upper case", e.Message); } }