0
我現在只做了大約3周的測試。我正在嘗試爲TestChangePassword編寫一個測試。我的問題是,我堅持。我不知道該打什麼電話,或者測試什麼。有人可以舉個例子來解釋你的例子嗎?ChangePassword測試
[TestMethod]
public void TestChangePassword()
{
try //Assert.AreEqual(password, "ABCDE");//Assert.AreEqual(oldPwd, "ABCDE");
{
AsaMembershipProvider prov = this.GetMembershipProvider();
bool success = prov.ChangePassword("test.user", "test", "ABCDE");
if (success)
{
// Change it back
success = prov.ChangePassword("test.user", "ABCDE", "test");
}
}
catch (Exception ex)
{
LogMessage(ex);
Assert.Fail(ex.Message);
}
}