private LinkedParticipantRequest Create(string participantEmail, string linkedParticipantEmail)
        {
            var request = new LinkedParticipantRequest();

            request.ParticipantContactEmail       = participantEmail;
            request.LinkedParticipantContactEmail = linkedParticipantEmail;
            request.Type = LinkedParticipantType.Interpreter;
            return(request);
        }
        private static List <LinkedParticipantRequest> LinkedParticipantsBuilder(List <ParticipantRequest> participants)
        {
            var applicants = participants.Where(x => x.CaseRoleName == "Applicant").ToList();
            var request    = new LinkedParticipantRequest
            {
                ParticipantContactEmail       = applicants[0].ContactEmail,
                LinkedParticipantContactEmail = applicants[1].ContactEmail,
                Type = LinkedParticipantType.Interpreter
            };

            return(new List <LinkedParticipantRequest> {
                request
            });
        }
Esempio n. 3
0
        public void Should_Map_Multiple_LinkedParticipantRequests_To_Dto_Successfully()
        {
            var secondRequest = new LinkedParticipantRequest
            {
                ParticipantContactEmail       = "*****@*****.**",
                LinkedParticipantContactEmail = "*****@*****.**",
                Type = LinkedParticipantType.Interpreter
            };

            _requests.Add(secondRequest);

            var dtos = LinkedParticipantRequestToLinkedParticipantDtoMapper.MapToDto(_requests);

            dtos.Count.Should().Be(2);
        }
        public void GivenIHaveAnInterpreterLinkedToAParticipant()
        {
            var participants = _context.TestData.Hearing.Participants
                               .Where(x => x.UserRoleName.ToLower() == "individual" || x.UserRoleName.ToLower() == "representative").ToList();
            var interpretee = participants[0];
            var interpreter = participants[1];

            var linkedParticipant = new LinkedParticipantRequest
            {
                LinkedParticipantContactEmail = interpreter.ContactEmail,
                ParticipantContactEmail       = interpretee.ContactEmail,
                Type = LinkedParticipantType.Interpreter
            };

            var request = new UpdateParticipantRequestBuilder().Build();

            request.LinkedParticipants = new List <LinkedParticipantRequest> {
                linkedParticipant
            };

            _context.Request = _context.Put(UpdateParticipantDetails(_context.TestData.Hearing.Id, interpretee.Id), request);
        }
Esempio n. 5
0
 public void SetUp()
 {
     _validator = new LinkedParticipantRequestValidation();
     _request   = BuildRequest();
 }