public void InvalidatesFalsePassword() { // Arrange var account = new Account("*****@*****.**"); // Act account.Activate("some password"); // Assert Assert.That(account.ValidatePassword("invalid password"), Is.False); }
public void ActivatedAccountCanValidatePasswords() { // Arrange var account = new Account("*****@*****.**"); // Act account.Activate("some password"); // Assert account.ValidatePassword(""); }
public void InactiveAccountDoesNotValidatePasswords() { // Arrange var account = new Account("*****@*****.**"); // Act try { account.ValidatePassword("some password"); // Assert Assert.Fail("Should throw"); } catch (InvalidOperationException) { } }