public void BankAccountSpecificationValiBankAccountNumberReturnAndSpec()
        {
            //Arrange
            ISpecification <BankAccount> spec = null;

            //Act
            spec = BankAccountSpecifications.BankAccountIbanNumber("AB001");

            //assert
            Assert.IsInstanceOfType(spec, typeof(AndSpecification <BankAccount>));
        }
        public void BankAccountSpecificationEmptyBankAccountNumberReturnTrueSpec()
        {
            //Arrange
            ISpecification <BankAccount> spec = null;

            //Act
            spec = BankAccountSpecifications.BankAccountIbanNumber(null);

            //assert
            Assert.IsInstanceOfType(spec, typeof(TrueSpecification <BankAccount>));
        }
示例#3
0
        public void BankAccountSpecificationValiBankAccountNumberReturnAndSpec()
        {
            //Arrange
            ISpecification <BankAccount> spec = null;

            //Act
            spec = BankAccountSpecifications.BankAccountIbanNumber("AB001");

            //assert
            Assert.IsType <AndSpecification <BankAccount> >(spec);
        }
示例#4
0
        public void BankAccountSpecificationNullBankAccountNumberReturnTrueSpec()
        {
            //Arrange
            ISpecification <BankAccount> spec = null;

            //Act
            spec = BankAccountSpecifications.BankAccountIbanNumber(null);

            //assert
            Assert.IsType <TrueSpecification <BankAccount> >(spec);
        }
        public void BankAccountRepositoryAllMatchingMethodReturnEntitiesWithSatisfiedCriteria()
        {
            //Arrange
            var bankAccountRepository = new BankAccountRepository(fixture.unitOfWork, fixture.bankAccountLogger);

            string iban = string.Format("ES{0} {1} {2} {0}{3}", "02", "4444", "5555", "3333333333");

            var spec = BankAccountSpecifications.BankAccountIbanNumber(iban);

            //Act
            var result = bankAccountRepository.AllMatching(spec);

            //Assert
            Assert.NotNull(result);
            Assert.True(result.All(b => b.Iban == iban));
        }