public void BankAccountRepositoryGetAllReturnMaterializedBankAccountsAndCustomers()
        {
            //Arrange
            var bankAccountRepository = new BankAccountRepository(fixture.unitOfWork, fixture.bankAccountLogger);

            //Act
            var allItems = bankAccountRepository.GetAll();

            //Assert
            Assert.NotNull(allItems);
            Assert.True(allItems.Any());
            Assert.True(allItems.All(ba => ba.Customer != null));
        }
        public void BankAccountRepositoryGetAllReturnMaterializedBankAccountsAndCustomers()
        {
            //Arrange
            var unitOfWork            = new MainBCUnitOfWork();
            var bankAccountRepository = new BankAccountRepository(unitOfWork);

            //Act
            var allItems = bankAccountRepository.GetAll();

            //Assert
            Assert.IsNotNull(allItems);
            Assert.IsTrue(allItems.Any());
            Assert.IsTrue(allItems.All(ba => ba.Customer != null));
        }
      public void BankAccountRepositoryGetAllReturnMaterializedBankAccountsAndCustomers()
      {
         //Arrange
         var unitOfWork = new MainBcUnitOfWork();
         var bankAccountRepository = new BankAccountRepository(unitOfWork);

         //Act
         var allItems = bankAccountRepository.GetAll();

         //Assert
         Assert.IsNotNull(allItems);
         Assert.IsTrue(allItems.Any());
         Assert.IsTrue(allItems.All(ba => ba.Customer != null));
      }
Ejemplo n.º 4
0
 public IEnumerable <BankAccountModel> BankAccounts()
 {
     return(Mapper.Map <IEnumerable <BankAccountModel> >(BankAccountRepository.GetAll().OrderByDescending(entity => entity.Active).ThenBy(entity => entity.BankName).ThenBy(entity => entity.AccountName)));
 }
Ejemplo n.º 5
0
 public IEnumerable <BankAccount> GetAll()
 {
     return(_bankAccountRepository.GetAll());
 }