Why does the last assert in this built-in unit test in the ASP.NET MVC 2 project pass?
//File: AccountControllerTest.cs
[TestMethod]
public void ChangePassword_Get_ReturnsView()
{
// Arrange
AccountController controller = GetAccountController();
// Act
ActionResult result = controller.ChangePassword();
// Assert
Assert.IsInstanceOfType(result, typeof(ViewResult));
Assert.AreEqual(10, ((ViewResult)result).ViewData["PasswordLength"]);
}
Shouldn't ViewData["PasswordLength"] be 6? If you look in the project Web.config, minRequiredPasswordLength has the value 6, not 10.
//File: Web.config
<membership>
<providers>
<add name="AspNetSqlMembershipProvider" ... minRequiredPasswordLength="6" ... />
</providers>
</membership>