コード例 #1
0
        public void ShouldJustFillMorningSession()
        {
            var track = new Track();

            var talk1 = new Talk { Title = "Sample Talk 1", Minutes = 179 };
            track.Allocate(talk1);

            var talk2 = new Talk { Title = "Sample Talk 2", Minutes = 1 };
            track.Allocate(talk1);

            Assert.AreEqual(1, track.Morning.Talks.Count);
        }
コード例 #2
0
        public void ShouldNotAddExtraLongTalkToMorningSession()
        {
            var track = new Track();

            var talk = new Talk { Title = "Sample Talk 123", Minutes = 60 * 3 + 1 };
            track.Allocate(talk);

            Assert.AreEqual(track.Afternoon.Talks.First().Title, "Sample Talk 123");
        }
コード例 #3
0
        public void ShouldAddShortTalkToMorningSession()
        {
            var track = new Track();

            var talk = new Talk { Title = "Sample Talk 123", Minutes = 1 };
            track.Allocate(talk);

            Assert.AreEqual(track.Morning.Talks.First().Title, "Sample Talk 123");
        }
コード例 #4
0
        public void ShouldBringNetworkingForwardToFourPM()
        {
            var track = new Track();

            var talk = new Talk { Title = "Sample Talk 123", Minutes = 1 };
            track.Allocate(talk);

            var networkingTime = track.NetworkingTime;
            var fourPM = new TimeSpan(16, 0, 0);

            Assert.AreEqual(networkingTime, fourPM);
        }
コード例 #5
0
        public void ShouldFillTrack()
        {
            var track = new Track();
            var talks = CreateFullDaySampleTalks();

            foreach (var talk in talks)
            {
                track.Allocate(talk);
            }

            var isFull = track.IsFull;
            Assert.AreEqual(true, isFull);
        }
コード例 #6
0
        public void ShouldNotGoOvertime()
        {
            var track = new Track();

            var talk1 = new Talk { Title = "Sample Talk 1", Minutes = 179 };
            track.Allocate(talk1);

            var talk2 = new Talk { Title = "Sample Talk 2", Minutes = 2 };
            track.Allocate(talk1);

            Assert.AreEqual(1, track.Morning.Talks.Count);
        }