public void should_have_unique_tile_positions() { var participantA = new Participant { Id = Guid.NewGuid(), DisplayName = "Interpreter Doe" }; var participantB = new Participant { Id = Guid.NewGuid(), DisplayName = "Interpretee Doe" }; var testVmr = new SharedParticipantRoomResponse { Label = "Interpreter1", ParticipantJoinUri = "joidshfdsf", PexipNode = "sip.unit.test.com" }; var resultA = _sut.Map(testVmr, participantA, false); var resultB = _sut.Map(testVmr, participantB, false); resultA.TileDisplayName.Should().NotMatch(resultB.TileDisplayName); }
public async Task should_return_okay_when_room_maps() { var vmr = new SharedParticipantRoomResponse() { Label = "Interpreter1", ParticipantJoinUri = "pat_join__interpreter", PexipNode = "sip.unit.test.com" }; var participantId = _testConference.Participants.First(x => !x.IsWitness() && !x.IsJudge()).Id; var conferenceId = _testConference.Id; _mocker.Mock <IVideoApiClient>() .Setup(x => x.GetInterpreterRoomForParticipantAsync(conferenceId, participantId)) .ReturnsAsync(vmr); var result = await _controller.GetParticipantRoomForParticipant(conferenceId, participantId); result.Should().BeAssignableTo <OkObjectResult>().Which.Value.Should() .BeAssignableTo <SharedParticipantRoom>(); }
public void should_map_vmr_to_interpreter_room() { var participant = new Participant { Id = Guid.NewGuid(), DisplayName = "Interpreter Doe" }; var testVmr = new SharedParticipantRoomResponse { Label = "Interpreter1", ParticipantJoinUri = "joidshfdsf", PexipNode = "sip.unit.test.com" }; var result = _sut.Map(testVmr, participant, false); result.PexipNode.Should().Be(testVmr.PexipNode); result.ParticipantJoinUri.Should().Be(testVmr.ParticipantJoinUri); result.DisplayName.Should().Be(testVmr.Label); result.TileDisplayName.Should().EndWith($"{participant.DisplayName};{participant.Id}"); }
public async Task should_return_call_get_judicial_room_when_participant_type_is_joh() { var vmr = new SharedParticipantRoomResponse() { Label = "PanelMember1", ParticipantJoinUri = "pat_join__panelmember", PexipNode = "sip.unit.test.com" }; var participantId = _testConference.Participants.First(x => x.Role == Role.JudicialOfficeHolder).Id; var conferenceId = _testConference.Id; var participantType = "Judicial"; _mocker.Mock <IVideoApiClient>() .Setup(x => x.GetJudicialRoomForParticipantAsync(conferenceId, participantId)) .ReturnsAsync(vmr); var result = await _controller.GetParticipantRoomForParticipant(conferenceId, participantId, participantType); result.Should().BeAssignableTo <OkObjectResult>().Which.Value.Should() .BeAssignableTo <SharedParticipantRoom>(); }