Exemple #1
0
        public void UpdateCaseStatusReturns200andUpdateCaseStatusOnSuccess()
        {
            var resident     = TestHelpers.CreatePerson();
            var request      = TestHelpers.CreateUpdateCaseStatusRequest();
            var mockResponse = TestHelpers.CreateCaseStatus(personId: resident.Id, startDate: DateTime.Now.AddDays(-1),
                                                            endDate: DateTime.Now.AddDays(1)).ToDomain().ToResponse();

            _mockCaseStatusesUseCase
            .Setup(x => x.ExecuteUpdate(request))
            .Returns(mockResponse);

            var response = _caseStatusController.UpdateCaseStatus(request) as ObjectResult;

            response?.StatusCode.Should().Be(200);
            response?.Value.Should().BeEquivalentTo(mockResponse);
        }