Ejemplo n.º 1
0
        public void should_map_hearing_to_response_model_without_case()
        {
            var hearing = new VideoHearingBuilder().Build();

            var result = HearingToUsernameForDeletionResponseMapper.MapToDeletionResponse(hearing);

            result.Venue.Should().Be(hearing.HearingVenueName);
            result.ScheduledDateTime.Should().Be(hearing.ScheduledDateTime);
            result.CaseName.Should().BeNullOrEmpty();
            result.CaseNumber.Should().BeNullOrEmpty();
        }
Ejemplo n.º 2
0
        public void should_map_hearing_to_response_model_with_first_case()
        {
            var hearing   = BuildHearing(false);
            var firstCase = hearing.GetCases().First();

            var result = HearingToUsernameForDeletionResponseMapper.MapToDeletionResponse(hearing);

            result.Venue.Should().Be(hearing.HearingVenueName);
            result.ScheduledDateTime.Should().Be(hearing.ScheduledDateTime);
            result.CaseName.Should().Be(firstCase.Name);
            result.CaseNumber.Should().Be(firstCase.Number);
        }
Ejemplo n.º 3
0
        public void should_map_hearing_to_response_model_with_lead_case()
        {
            var hearing  = BuildHearing(true);
            var leadCase = hearing.GetCases().First(x => x.IsLeadCase);

            var result = HearingToUsernameForDeletionResponseMapper.MapToDeletionResponse(hearing);

            result.HearingId.Should().Be(hearing.Id);
            result.Venue.Should().Be(hearing.HearingVenueName);
            result.ScheduledDateTime.Should().Be(hearing.ScheduledDateTime);
            result.CaseName.Should().Be(leadCase.Name);
            result.CaseNumber.Should().Be(leadCase.Number);
        }