Example #1
0
        public async void GetAccountDetailsForYear_ShouldCallService()
        {
            // Arrange
            _mockService.Setup(_ => _.GetCouncilTaxDetailsForYear(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>()))
            .ReturnsAsync(It.IsAny <ReceivedYearTotal>());

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

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

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