Example #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);
        }
Example #2
0
        public IActionResult JoinTheMeeting(Guid meetingId, Guid userId)
        {
            try
            {
                MeetingModel meeting = meetingAppService.JoinTheMeeting(meetingId, userId);

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