示例#1
0
        public void AccountNumberValidatorTest()
        {
            AccountNumberValidator validator = new AccountNumberValidator("83101010230000261395100000");

            var isCorrect = validator.isAccountNumberCorrect();

            Assert.IsTrue(isCorrect);
        }
示例#2
0
        public BankAccountFacade(int accountNumber, int pinCode)
        {
            this.PinCode       = pinCode;
            this.AccountNumber = accountNumber;

            _fundsValidator         = new AccountFundsValidator();
            _accountNumberValidator = new AccountNumberValidator();
            _securityCodeValidator  = new SecurityCodeValidator();
        }
示例#3
0
        public void Tests(string accountNumber, bool isValid)
        {
            // Arrange

            // Act
            IValidator validator = new AccountNumberValidator();

            // Assert
            Assert.AreEqual(isValid, validator.CheckIsAccountNumberValid(accountNumber));
        }
示例#4
0
        public void Tests(string input, string expectedResult)
        {
            // Arrange

            // Act
            IValidator validator = new AccountNumberValidator();

            // Assert
            Assert.AreEqual(expectedResult, validator.ValidateAccountNumber(input));
        }
示例#5
0
        public void Tests(string accountNumber, bool isValid)
        {
            // Arrange
            var sut = new AccountNumberValidator();

            // Act
            var result = sut.Validate(accountNumber);

            // Assert
            Assert.AreEqual(isValid, result);
        }
示例#6
0
 public void SetUp()
 {
     validator = new AccountNumberValidator();
 }
示例#7
0
 public AccountNumberValidatorTests()
 {
     _numberValidator = new AccountNumberValidator();
 }