public void ThenIndividualDetailsShouldBeUpdated(string participant)
        {
            var model = RequestHelper.Deserialise <ParticipantResponse>(_context.Response.Content);
            var updateParticipantRequest = UpdateParticipantRequest.BuildRequest();

            model.Should().NotBeNull();
            model.Title.Should().Be(updateParticipantRequest.Title);
            model.DisplayName.Should().Be(updateParticipantRequest.DisplayName);
            model.TelephoneNumber.Should().Be(updateParticipantRequest.TelephoneNumber);
            model.LinkedParticipants.Count.Should().Be(participant == "Individual" ? 1 : 0);
        }
        public void GivenIHaveAnUpdateParticipantDetailsRequestWithAValidUserRole(string role)
        {
            var participantResponses = _context.TestData.ParticipantsResponses;
            var isIndividual         = role == "Individual";
            var participant          = isIndividual ? participantResponses.FirstOrDefault(x => x.UserRoleName.Equals(role) && !x.LinkedParticipants.Any())
                                    : participantResponses.FirstOrDefault(x => x.UserRoleName.Equals(role));
            var updateParticipantRequest = UpdateParticipantRequest.BuildRequest();

            _context.Request = _context.Put(UpdateParticipantDetails(_context.TestData.Hearing.Id, participant.Id), updateParticipantRequest);
            if (isIndividual)
            {
                var interpreter = participantResponses.FirstOrDefault(x => x.HearingRoleName.Equals("Interpreter"));
                updateParticipantRequest.WithLinkedParticipants(participant.ContactEmail, interpreter.ContactEmail);
            }
            _context.Request = _context.Put(UpdateParticipantDetails(_context.TestData.Hearing.Id, participant.Id), updateParticipantRequest);
        }