public async Task should_remove_participant_from_interpreter_room()
        {
            var conference = await TestDataManager.SeedConference();

            _newConferenceId = conference.Id;
            await SetupRoomWithParticipant(conference);

            var participant = _room.RoomParticipants.First();

            var command = new RemoveParticipantFromParticipantRoomCommand(_room.Id, participant.ParticipantId);
            await _handler.Handle(command);

            var updatedRoom = await GetInterpreterRoom();

            updatedRoom.RoomParticipants.Any(p => p.ParticipantId == participant.ParticipantId).Should().BeFalse();
        }
        protected override async Task PublishStatusAsync(CallbackEvent callbackEvent)
        {
            if (SourceParticipant == null)
            {
                return;
            }

            await ReturnRoomParticipantToWaitingRoom();

            var participantState         = ParticipantState.Disconnected;
            var updateParticipantCommand = new UpdateParticipantStatusAndRoomCommand(SourceConference.Id, SourceParticipant.Id,
                                                                                     participantState, null, null);
            await CommandHandler.Handle(updateParticipantCommand);

            var removeFromRoomCommand =
                new RemoveParticipantFromParticipantRoomCommand(SourceParticipantRoom.Id, SourceParticipant.Id);
            await CommandHandler.Handle(removeFromRoomCommand);

            if (!SourceConference.IsClosed())
            {
                await AddDisconnectedTask();
            }
        }
        public void Should_throw_exception_if_no_room_found()
        {
            var command = new RemoveParticipantFromParticipantRoomCommand(999, Guid.NewGuid());

            Assert.ThrowsAsync <RoomNotFoundException>(() => _handler.Handle(command));
        }