public Task TransferParticipantAsync(Guid conferenceId, string participantId, string fromRoom, string toRoom) { _logger.LogInformation( "Transferring participant {ParticipantId} from {FromRoom} to {ToRoom} in conference: {ConferenceId}", participantId, fromRoom, toRoom, conferenceId); var request = new TransferParticipantParams { From = fromRoom, To = toRoom, Part_id = participantId.ToString() }; return(_kinlyApiClient.TransferParticipantAsync(conferenceId.ToString(), request)); }
private async Task TransferParticipantAsync(Guid conferenceId, string participantId, string fromRoom, string toRoom) { _logger.LogTrace( "Transferring participant {ParticipantId} from {FromRoom} to {ToRoom} in conference: {ConferenceId}", participantId, fromRoom, toRoom, conferenceId); var request = new TransferParticipantParams { From = fromRoom, To = toRoom, Part_id = participantId }; await _kinlyApiClient.TransferParticipantAsync(conferenceId.ToString(), request); }
public async Task Should_Successfully_Transfer_Participant_To_ConsultationRoom() { _queryHandler.Setup(x => x.Handle <GetConferenceByIdQuery, Conference>(It.IsAny <GetConferenceByIdQuery>())) .ReturnsAsync(TestConference); var room = _rooms.First(x => x.ConferenceId.Equals(_request.ConferenceId)); var participant = TestConference.Participants.First(x => x.Id.Equals(_request.RequestedBy)); await _consultationService.ParticipantTransferToRoomAsync(_request.ConferenceId, _request.RequestedBy, room.Label); var request = new TransferParticipantParams { From = participant.GetCurrentRoom(), To = room.Label, Part_id = participant.Id.ToString() }; _kinlyApiClient.Verify(x => x.TransferParticipantAsync(It.Is <string>( y => y.Equals(_request.ConferenceId.ToString())), It.Is <TransferParticipantParams>( y => y.From.Equals(request.From) && y.To.Equals(request.To) && y.Part_id.Equals(request.Part_id))), Times.Once); }
public async Task should_use_interpreter_room_when_participant_is_in_an_interpreter_room_on_leave() { var fromRoom = "ParticipantConsultationRoom1"; var toRoom = RoomType.WaitingRoom.ToString(); var participant = TestConference.Participants.First(x => x.Id.Equals(_request.RequestedBy)); var interpreterRoom = new ParticipantRoom(TestConference.Id, "Interpreter1", VirtualCourtRoomType.Civilian); interpreterRoom.SetProtectedProperty(nameof(interpreterRoom.Id), 999); var roomParticipant = new RoomParticipant(participant.Id) { Room = interpreterRoom, RoomId = interpreterRoom.Id }; interpreterRoom.AddParticipant(roomParticipant); participant.RoomParticipants.Add(roomParticipant); _queryHandler.Setup(x => x.Handle <GetConferenceByIdQuery, Conference>(It.IsAny <GetConferenceByIdQuery>())) .ReturnsAsync(TestConference); await _consultationService.LeaveConsultationAsync(_request.ConferenceId, participant.Id, fromRoom, toRoom); var request = new TransferParticipantParams { From = fromRoom, To = toRoom, Part_id = interpreterRoom.Id.ToString() }; _kinlyApiClient.Verify(x => x.TransferParticipantAsync(It.Is <string>( y => y.Equals(_request.ConferenceId.ToString())), It.Is <TransferParticipantParams>( y => y.From.Equals(request.From) && y.To.Equals(request.To) && y.Part_id.Equals(request.Part_id))), Times.Once); }