Example #1
0
        public void TestOriginalDuration()
        {
            TimeSpan testDur    = TimeSpan.FromMinutes(10);
            TimeSpan changedDur = TimeSpan.FromMinutes(20);

            TalkScheduleItem item = new TalkScheduleItem {
                OriginalDuration = testDur
            };

            Assert.AreEqual(item.OriginalDuration, testDur);
            Assert.AreEqual(item.ActualDuration, testDur);

            Assert.IsNull(item.ModifiedDuration);
            Assert.IsNull(item.AdaptedDuration);

            Assert.IsTrue(item.GetPlannedDurationSeconds() == (int)testDur.TotalSeconds);

            item.ModifiedDuration = changedDur;
            Assert.AreEqual(item.OriginalDuration, testDur);
            Assert.AreEqual(item.ModifiedDuration, changedDur);

            Assert.IsTrue(item.GetPlannedDurationSeconds() == (int)changedDur.TotalSeconds);
        }
Example #2
0
        public void TestOriginalDuration()
        {
            var testDur    = TimeSpan.FromMinutes(10);
            var changedDur = TimeSpan.FromMinutes(20);

            var item = new TalkScheduleItem(10000, "A Name", string.Empty, string.Empty)
            {
                OriginalDuration = testDur
            };

            Assert.AreEqual(item.OriginalDuration, testDur);
            Assert.AreEqual(item.ActualDuration, testDur);

            Assert.IsNull(item.ModifiedDuration);
            Assert.IsNull(item.AdaptedDuration);

            Assert.IsTrue(item.GetPlannedDurationSeconds() == (int)testDur.TotalSeconds);

            item.ModifiedDuration = changedDur;
            Assert.AreEqual(item.OriginalDuration, testDur);
            Assert.AreEqual(item.ModifiedDuration, changedDur);

            Assert.IsTrue(item.GetPlannedDurationSeconds() == (int)changedDur.TotalSeconds);
        }