public void TestProjectSetInTimelineEvents() { Utils.ProjectDummy p = CreateProject(); TimelineEvent evt = new TimelineEvent(); p.AddEvent(evt); Utils.ProjectDummy newp = Utils.SerializeDeserialize(p); Assert.AreEqual(newp, newp.Timeline [0].Project); }
public void TestRemoveEvents() { TimelineEvent p1, p2, p3; List <TimelineEvent> plays = new List <TimelineEvent> (); Utils.ProjectDummy p = CreateProject(false); p1 = new TimelineEvent(); p2 = new TimelineEvent(); p3 = new TimelineEvent(); p.AddEvent(p1); p.AddEvent(p2); p.AddEvent(p3); plays.Add(p1); plays.Add(p2); p.RemoveEvents(plays); Assert.AreEqual(p.Timeline.Count, 1); Assert.AreEqual(p.Timeline [0], p3); }
public void TestSerialization() { Utils.ProjectDummy p = new Utils.ProjectDummy(); Utils.CheckSerialization(p); p = CreateProject(); Utils.CheckSerialization(p); p.AddEvent(new TimelineEvent()); Utils.CheckSerialization(p); Utils.ProjectDummy newp = Utils.SerializeDeserialize(p); Assert.AreEqual(newp.CompareTo(p), 0); Assert.AreEqual(newp.Timeline.Count, p.Timeline.Count); }