Beispiel #1
0
        public async Task ThenOnlyTodaysConferencesShouldBeRetrieved()
        {
            var conferences = await Response.GetResponses <List <ConferenceForAdminResponse> >(_context.Response.Content);

            conferences.Should().NotBeNullOrEmpty();
            foreach (var conference in conferences)
            {
                AssertConferenceForAdminResponse.ForConference(conference);
                conference.ScheduledDateTime.Day.Should().Be(DateTime.Now.Day);
            }
        }
Beispiel #2
0
        public void ThenTheSummaryOfConferenceDetailsShouldBeRetrieved()
        {
            var conferences = RequestHelper.Deserialise <List <ConferenceForAdminResponse> >(_context.Response.Content);

            conferences.Should().NotBeNull();
            _context.Test.ConferenceResponse.Id = conferences.First().Id;
            foreach (var conference in conferences)
            {
                AssertConferenceForAdminResponse.ForConference(conference);
                foreach (var participant in conference.Participants)
                {
                    AssertParticipantSummaryResponse.ForParticipant(participant);
                }
            }
        }
Beispiel #3
0
        public void ThenAListOfTheConferenceDetailsShouldBeRetrieved()
        {
            var conferences = RequestHelper.Deserialise <List <ConferenceForAdminResponse> >(_context.Response.Content);

            conferences.Should().NotBeNull();
            conferences.Any(x => x.CaseName.StartsWith(_context.Test.CaseName)).Should().BeTrue();
            foreach (var conference in conferences)
            {
                if (conference.CaseName.StartsWith(_context.Test.CaseName))
                {
                    AssertConferenceForAdminResponse.ForConference(conference);
                    foreach (var participant in conference.Participants)
                    {
                        AssertParticipantSummaryResponse.ForParticipant(participant);
                    }
                    conference.ScheduledDateTime.DayOfYear.Should().Be(DateTime.Now.DayOfYear);
                }
            }

            _context.Test.ConferenceResponses = conferences.Where(x => x.CaseName.StartsWith(_context.Test.CaseName)).ToList();
            conferences.Any(x => x.Id.Equals(_context.Test.TomorrowsConference)).Should().BeFalse();
        }