1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| [TestCase(new object[] { "johnwu", "pass.123", "pass.1234" }, ExpectedResult = true, TestName = "ChangePassword_Success")] [TestCase(new object[] { "johnwu", "pass.123", "pass.123" }, ExpectedResult = false, TestName = "ChangePassword_Same_Password")] [TestCase(new object[] { "johnwu", "pass", "pass.123" }, ExpectedResult = false, TestName = "ChangePassword_Old_Password_Too_Short")] [TestCase(new object[] { "johnwu", "01234567890123456789a", "pass.123" }, ExpectedResult = false, TestName = "ChangePassword_Old_Password_Too_Long")] [TestCase(new object[] { "johnwu", "pass.123", "pass" }, ExpectedResult = false, TestName = "ChangePassword_New_Password_Too_Short")] [TestCase(new object[] { "johnwu", "pass.123", "01234567890123456789a" }, ExpectedResult = false, TestName = "ChangePassword_New_Password_Too_Long")] [TestCase(new object[] { "john", "pass.123", "pass.1234" }, ExpectedResult = false, TestName = "ChangePassword_LoginName_Too_Short")] [TestCase(new object[] { "01234567890123456789a", "pass.123", "pass.1234" }, ExpectedResult = false, TestName = "ChangePassword_LoginName_Too_Long")] [TestCase(new object[] { "john.wu", "pass.123", "pass.1234" }, ExpectedResult = false, TestName = "ChangePassword_LoginName_Incorrect_Format")] public bool ChangePassword(string loginName, string oldPassword, string newPassword) { var actual = _memberBLL.ChangePassword(loginName, oldPassword, newPassword);
return actual; }
|