Exemple #1
0
        public async Task GetCustomerAccountsAsync_ForNonExistingAccountId_ReturnsNullAsync()
        {
            var repo = new AccountsInMemRepository(_dataProvider.Object);

            var result = await repo.GetCustomerAccountsAsync(100);

            result.Should().BeNull();
        }
Exemple #2
0
        public void GetCustomerAccountsAsync_ForExistingAccountId_ReturnsNonEmptyList()
        {
            var repo = new AccountsInMemRepository(_dataProvider.Object);

            Task <IEnumerable <AccountViewModel> > task = repo.GetCustomerAccountsAsync(1);
            var result = task.Result;

            result.Should().NotBeNullOrEmpty();
        }
Exemple #3
0
        public void GetCustomerAccountAsync_WithNoAccountData_ReturnsNull()
        {
            var dataProvider = new Mock <ITestDataProvider>();
            var repo         = new AccountsInMemRepository(dataProvider.Object);

            Task <IEnumerable <AccountViewModel> > task = repo.GetCustomerAccountsAsync(1);
            var result = task.Result;

            result.Should().BeNull();
        }