Exemplo n.º 1
0
        public async Task ThenTheLevyDeclarationsAreReturned()
        {
            var expectedLevyDeclarations = new AccountResourceList <LevyDeclarationViewModel>(new List <LevyDeclarationViewModel>());

            var levyHref = $"/api/accounts/2385/levy/";

            AccountApiClient.Setup(x => x.GetResource <AccountResourceList <LevyDeclarationViewModel> >(levyHref)).ReturnsAsync(expectedLevyDeclarations);

            var result = await AccountGateway.GetLevyDeclarations(levyHref);

            result.Should().BeSameAs(expectedLevyDeclarations);
            AccountApiClient.Verify(x => x.GetResource <AccountResourceList <LevyDeclarationViewModel> >(levyHref), Times.Once);
        }