public void ParseSubTalksRight() { var talksubtalk = new Talk() { Title = "this is a talk", StartDate = DateTime.Now - TimeSpan.FromMinutes(30), EndDate = DateTime.Now + TimeSpan.FromMinutes(30), ID = "5", SlideURL = null, Speakers = new string[] { }, TalkType = TypeOfTalk.Talk, FilenameExtension = null, DisplayFilename = null, SubTalks = new Talk[] { new Talk() { ID = "10", SlideURL = null, Speakers = new string[] { }, TalkType = TypeOfTalk.Talk, FilenameExtension = null, DisplayFilename = "fork of it", Title = "subtalk1" } } }; var mr = new IndicoMeetingRef.IndicoTalk(talksubtalk, "t1"); Assert.AreEqual(1, mr.SubTalks.Length); Assert.AreEqual("subtalk1", mr.SubTalks[0].Title); }
public void TalksAreSame() { var t1 = MakeTalk(); var t2 = MakeTalk(); var tt1 = new IndicoMeetingRef.IndicoTalk(t1, "hi"); var tt2 = new IndicoMeetingRef.IndicoTalk(t2, "hi"); Assert.IsTrue(tt1.Equals(tt2)); }
public void TalkFileChanges() { var t1 = MakeTalk(); var t2 = MakeTalk(); t2.SlideURL = "http://indico.cern.ch"; var tt1 = new IndicoMeetingRef.IndicoTalk(t1, "hi"); var tt2 = new IndicoMeetingRef.IndicoTalk(t2, "hi"); Assert.IsFalse(tt1.Equals(tt2)); }
public void TalkStartDateChanges() { var t1 = MakeTalk(); var t2 = MakeTalk(); t2.StartDate = DateTime.Now; var tt1 = new IndicoMeetingRef.IndicoTalk(t1, "hi"); var tt2 = new IndicoMeetingRef.IndicoTalk(t2, "hi"); Assert.IsFalse(tt1.Equals(tt2)); }
public void TalkTitlesChange() { var t1 = MakeTalk(); var t2 = MakeTalk(); t2.Title = "second-title"; var tt1 = new IndicoMeetingRef.IndicoTalk(t1, "hi"); var tt2 = new IndicoMeetingRef.IndicoTalk(t2, "hi"); Assert.IsFalse(tt1.Equals(tt2)); }
public void NoSubTalksIsNotNull() { var mess = new Talk() { Title = "this is a talk", StartDate = DateTime.Now - TimeSpan.FromMinutes(30), EndDate = DateTime.Now + TimeSpan.FromMinutes(30), ID = "5", SlideURL = null, Speakers = new string[] { }, TalkType = TypeOfTalk.Talk, FilenameExtension = null, DisplayFilename = null }; var mr = new IndicoMeetingRef.IndicoTalk(mess, "t1"); Assert.AreEqual(0, mr.SubTalks.Length); }
public void TalkFileUrlIsAMess() { var mess = new Talk() { Title = "this is a talk", StartDate = DateTime.Now - TimeSpan.FromMinutes(30), EndDate = DateTime.Now + TimeSpan.FromMinutes(30), ID = "5", SlideURL = "https://indico.fnal.gov/getFile.py/access?contribId=13&sessionId=0&resId=0&materialId=slides&confId=9726", Speakers = new string[] { "G. Watts", "M. Verdu", "R. Upton" }, TalkType = TypeOfTalk.Talk, FilenameExtension = ".pdf", DisplayFilename = "dude" }; var mr = new IndicoMeetingRef.IndicoTalk(mess, "t1"); Assert.AreEqual("pdf", mr.TalkFile.FileType); }