public void TryParse_Empty_ReturnsFalse() { // arrange/act var result = NZBankAccount.TryParse(string.Empty, out _); // assert Assert.IsFalse(result); }
public void TryParse_Null_ReturnsFalse() { // arrange/act var result = NZBankAccount.TryParse(null, out _); // assert Assert.IsFalse(result); }
public void TryParse_MalformedAccountNumber_ReturnsFalse() { // arrange/act var result = NZBankAccount.TryParse("01 0902 0068389 00", out _); // assert Assert.IsTrue(result); }
public void TryParse_WellFormedWithThreeDigitSuffix_ReturnsTrue() { // arrange/act var result = NZBankAccount.TryParse("01 0902 0068389 000", out _); // assert Assert.IsTrue(result); }
public void TryParse_WellFormedWithDots_ReturnsTrue() { // arrange/act var result = NZBankAccount.TryParse("01.0902.0068389.00", out _); // assert Assert.IsTrue(result); }
public void TryParse_WellFormedAccountNumberInvalid_ReturnsFalse() { // arrange var isParsed = NZBankAccount.TryParse("00-0000-0000000-00", out NZBankAccount account); // act var isValid = account.IsValid(); // assert Assert.IsTrue(isParsed); Assert.IsFalse(isValid); }