コード例 #1
0
        public void JoinTheMeeting()
        {
            Guid userId = Guid.NewGuid();

            MeetingModel createdMeeting = meetingAppService.CreateMeeting(facilitatorId);
            MeetingModel joinedMeeting  = meetingAppService.JoinTheMeeting(createdMeeting.Id, userId);

            Assert.That(joinedMeeting, Is.EqualTo(createdMeeting));
            Assert.IsFalse(joinedMeeting.UserIsTheFacilitator);
            AssertThatTheQuestionsOfTheJoinedMeetingAreEqualToTheQuestionsOfTheCreatedMeeting(joinedMeeting, createdMeeting);
        }
コード例 #2
0
        public IActionResult JoinTheMeeting(Guid meetingId, Guid userId)
        {
            try
            {
                MeetingModel meeting = meetingAppService.JoinTheMeeting(meetingId, userId);

                return(Ok(meeting));
            }
            catch (NonExistentMeetingException)
            {
                return(BadRequest());
            }
        }