Exemplo n.º 1
0
        public async Task GetTransactionsForAccountAsync_ForNonExistingAccountId_ReturnsNullAsync()
        {
            var repo = new TransactionsInMemRepository(_dataProvider.Object);

            var result = await repo.GetTransactionsForAccountAsync(100);

            result.Should().BeNull();
        }
Exemplo n.º 2
0
        public void GetTransactionsForAccountAsync_ForExistingAccountId_ReturnsNonEmptyList()
        {
            var repo = new TransactionsInMemRepository(_dataProvider.Object);

            MappingsConfiguration.InitializeAutoMapper();

            Task <IEnumerable <TransactionViewModel> > task = repo.GetTransactionsForAccountAsync(1);
            var result = task.Result;

            result.Should().NotBeNullOrEmpty();
            result.Should().OnlyContain(x => x.AccountId == 1);
        }