Example #1
0
        public void TestAddEvent()
        {
            LMProject       p   = CreateProject(false);
            LMTimelineEvent evt = p.CreateEvent(p.EventTypes [0], new Time(1000), new Time(2000),
                                                null, null, 0) as LMTimelineEvent;

            Assert.AreEqual(p, evt.Project);

            Assert.AreEqual(p.Timeline.Count, 0);
            p.AddEvent(p.EventTypes [0], new Time(1000), new Time(2000), null, null);
            Assert.AreEqual(p.Timeline.Count, 1);
            p.AddEvent(p.EventTypes [0], new Time(1000), new Time(2000), null, null);
            Assert.AreEqual(p.Timeline.Count, 2);

            evt = new LMTimelineEvent();
            p.AddEvent(evt);
            Assert.AreEqual(p, evt.Project);
            Assert.AreEqual(p.Description.FileSet, evt.FileSet);
            Assert.AreEqual(p.Timeline.Count, 3);
            p.AddEvent(new LMTimelineEvent());
            Assert.AreEqual(p.Timeline.Count, 4);
            /*FIXME: add test for score event updating pd score */
        }