예제 #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();
 }