Ejemplo n.º 1
0
        public void WhenMatchingIDReturnsActiveCaseStatusesWithNoActiveAnswers()
        {
            var(_, person, _) = CaseStatusHelper.SavePersonCaseStatusWithAnswersToDatabase(DatabaseContext, endDate: DateTime.Today.AddDays(-1));

            var response = _caseStatusGateway.GetActiveCaseStatusesByPersonId(person.Id);

            response.First().Answers.Count.Should().Be(1);
            response.First().Answers.First().EndDate.Should().NotBeNull();
        }
Ejemplo n.º 2
0
        public void WhenMatchingIDReturnsOnlyActiveAnswersInCaseStatuses()
        {
            var(_, person, _) = CaseStatusHelper.SavePersonCaseStatusWithAnswersToDatabase(DatabaseContext, discardedAt: DateTime.Today);

            var response = _caseStatusGateway.GetActiveCaseStatusesByPersonId(person.Id);

            response.Count.Should().Be(1);

            var responseElement = response.First();

            responseElement.Answers.Count.Should().Be(0);
        }