Skip to content

Commit

Permalink
VIH-10152 Audio recording required being changed to true on edit for …
Browse files Browse the repository at this point in the history
…Crime Crown Court or CACD (#1263)
  • Loading branch information
oliver-scott authored Sep 6, 2023
1 parent 84f3c84 commit ec31d9f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,5 @@ public void Should_map_properties_for_update_hearing_request()
result.QuestionnaireNotRequired.Should().Be(_newParticipantRequest.QuestionnaireNotRequired);
result.AudioRecordingRequired.Should().Be(_newParticipantRequest.AudioRecordingRequired);
}

[Test]
public void Should_map_property_AudioRecordingRequired_with_true_value_for_when_linkedParticipant_is_interpreter()
{
_newParticipantRequest.Participants = new List<EditParticipantRequest>
{
new EditParticipantRequest
{
LinkedParticipants = new List<LinkedParticipant>
{
new LinkedParticipant
{
Id = Guid.NewGuid(),
LinkedId = Guid.NewGuid(),
ParticipantId = Guid.NewGuid(),
Type = LinkedParticipantType.Interpreter
}
}
}
};
var result = HearingUpdateRequestMapper.MapTo(_newParticipantRequest, _username);
result.AudioRecordingRequired.Should().BeTrue();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static UpdateHearingRequest MapTo(EditHearingRequest editHearingRequest,
}
},
QuestionnaireNotRequired = false,
AudioRecordingRequired = editHearingRequest.Participants.Any(x=>x.LinkedParticipants.Any(s=>(int) s.Type == (int) LinkedParticipantType.Interpreter)) || editHearingRequest.AudioRecordingRequired,
AudioRecordingRequired = editHearingRequest.AudioRecordingRequired
};
return updateHearingRequest;
}
Expand Down

0 comments on commit ec31d9f

Please sign in to comment.