コード例 #1
0
 public ValidatorTestThrowException()
 {
     _bankCodeValidator      = new BankCodeValidator();
     _branchCodeValidator    = new BranchCodeValidator();
     _accountNumberValidator = new AccountNumberValidator();
     _ibanValidator          = new IbanValidator();
     _bbanValidator          = new BbanValidator();
 }
コード例 #2
0
        /// <summary>
        ///     Constructor that permits to set all the validator.
        /// </summary>
        /// <param name="bankCodeValidator">
        ///     Objects that contains the rules to validate a Bank Code.
        /// </param>
        /// <param name="branchCodeValidator">
        ///     Objects that contains the rules to validate a Branch Code.
        /// </param>
        /// <param name="accountNumberValidator">
        ///     Objects that contains the rules to validate an Account Number.
        /// </param>
        /// <param name="countryCodeValidator">
        ///     Objects that contains the rules to validate a Country Code.
        /// </param>
        /// <param name="ibanValidator">
        ///     Objects that contains the rules to validate an IBAN.
        /// </param>
        /// <param name="bbanValidator">
        ///     Objects that contains the rules to validate a BBAN.
        /// </param>
        /// <exception cref="ValidatorException">
        ///     If any validator is not valid a <see cref="ValidatorException" /> will be thrown.
        /// </exception>
        public DefaultValidators(
            IBankCodeValidator bankCodeValidator,
            IBranchCodeValidator branchCodeValidator,
            IAccountNumberValidator accountNumberValidator,
            ICountryCodeValidator countryCodeValidator,
            IIbanValidator ibanValidator,
            IBbanValidator bbanValidator)
        {
            CheckNotNullArgument<IBankCodeValidator>(bankCodeValidator, "bankCodeValidator");
            CheckNotNullArgument<IBranchCodeValidator>(branchCodeValidator, "branchCodeValidator");
            CheckNotNullArgument<IAccountNumberValidator>(accountNumberValidator, "accountNumberValidator");
            CheckNotNullArgument<ICountryCodeValidator>(countryCodeValidator, "countryCodeValidator");
            CheckNotNullArgument<IIbanValidator>(ibanValidator, "ibanValidator");
            CheckNotNullArgument<IBbanValidator>(bbanValidator, "bbanValidator");

            _bankCodeValidator = bankCodeValidator;
            _branchCodeValidator = branchCodeValidator;
            _accountNumberValidator = accountNumberValidator;
            _countryCodeValidator = countryCodeValidator;
            _ibanValidator = ibanValidator;
            _bbanValidator = bbanValidator;
        }
コード例 #3
0
 public AccountNumberValidatorTest()
 {
     _accountNumberValidator = new AccountNumberValidator();
 }
コード例 #4
0
 public OcrReportingService(IAccountNumberValidator accountNumberValidator) =>