public async Task should_update_room_with_new_details()
        {
            var seededConference = await TestDataManager.SeedConference();

            _newConferenceId = seededConference.Id;
            var room = new ParticipantRoom(_newConferenceId, VirtualCourtRoomType.Civilian);
            await TestDataManager.SeedRooms(new [] { room });

            var label     = "Interpreter1";
            var ingestUrl = "dummyurl";
            var node      = "node";
            var uri       = "fakeuri";
            var command   = new UpdateParticipantRoomConnectionDetailsCommand(_newConferenceId, room.Id, label, ingestUrl, node, uri);
            await _handler.Handle(command);

            var roomId = command.RoomId;

            await using var db = new VideoApiDbContext(VideoBookingsDbContextOptions);
            var updatedRoom = await db.Rooms.OfType <ParticipantRoom>().AsNoTracking()
                              .SingleAsync(c => c.Id == roomId);

            updatedRoom.Label.Should().Be(label);
            updatedRoom.IngestUrl.Should().Be(ingestUrl);
            updatedRoom.PexipNode.Should().Be(node);
            updatedRoom.ParticipantUri.Should().Be(uri);
        }
        private Task UpdateRoomConnectionDetails(Conference conference, long roomId, BookedParticipantRoomResponse vmr,
                                                 string ingestUrl)
        {
            var updateCommand = new UpdateParticipantRoomConnectionDetailsCommand(conference.Id, roomId, vmr.Room_label,
                                                                                  ingestUrl, vmr.Uris.Pexip_node, vmr.Uris.Participant);

            return(_commandHandler.Handle(updateCommand));
        }
        public void should_throw_exception_if_room_does_not_exist()
        {
            var command = new UpdateParticipantRoomConnectionDetailsCommand(Guid.NewGuid(), int.MaxValue, "Label", "ingest", "node", "uri");

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