Example #1
0
        public async void GetDocuments_ShouldCallService()
        {
            // Arrange
            _mockService.Setup(_ => _.GetDocuments(It.IsAny <string>()))
            .ReturnsAsync(It.IsAny <List <CouncilTaxDocumentReference> >());

            // Act
            var result = await _controller.GetDocuments(It.IsAny <string>());

            // Assert
            _mockService.Verify(_ => _.GetDocuments(It.IsAny <string>()), Times.Once);
            var actionResult = Assert.IsType <OkObjectResult>(result);

            Assert.Equal(200, actionResult.StatusCode);
        }