private async Task <long> CreateInterpreterRoom(Guid conferenceId, VirtualCourtRoomType type)
        {
            var createRoomCommand = new CreateParticipantRoomCommand(conferenceId, type);
            await _commandHandler.Handle(createRoomCommand);

            return(createRoomCommand.NewRoomId);
        }
Exemple #2
0
        public async Task Should_save_new_room()
        {
            var seededConference = await TestDataManager.SeedConference();

            TestContext.WriteLine($"New seeded conference id: {seededConference.Id}");
            _newConferenceId = seededConference.Id;


            var command = new CreateParticipantRoomCommand(_newConferenceId, VirtualCourtRoomType.Civilian);

            await _handler.Handle(command);

            command.NewRoomId.Should().BeGreaterThan(0);
            command.ConferenceId.Should().Be(_newConferenceId);
            command.Type.Should().Be(command.Type);
        }
Exemple #3
0
        public void Should_throw_exception_if_no_conference_found()
        {
            var command = new CreateParticipantRoomCommand(Guid.NewGuid(), VirtualCourtRoomType.Civilian);

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