Пример #1
0
        public void Should_update_close_time_when_updating_status_to_closed()
        {
            var beforeActionTime = DateTime.UtcNow;
            var conference       = new ConferenceBuilder()
                                   .WithParticipant(UserRole.Individual, "Claimant")
                                   .Build();

            conference.GetCurrentStatus().Should().Be(ConferenceState.NotStarted);
            conference.ClosedDateTime.Should().BeNull();
            conference.CloseConference();
            conference.ClosedDateTime.Should().NotBeNull();
            conference.ClosedDateTime.Value.Should().BeAfter(beforeActionTime);
            conference.GetCurrentStatus().Should().Be(ConferenceState.Closed);
        }
Пример #2
0
        public void Should_add_conference_status()
        {
            var conference = new ConferenceBuilder()
                             .WithParticipant(UserRole.Individual, "Claimant")
                             .Build();

            conference.GetCurrentStatus().Should().Be(ConferenceState.NotStarted);
            var beforeCount = conference.GetConferenceStatuses().Count;

            conference.CloseConference();
            var afterCount = conference.GetParticipants().Count;

            afterCount.Should().BeGreaterThan(beforeCount);

            conference.GetCurrentStatus().Should().Be(ConferenceState.Closed);
        }