static void VerifyLinkList(LinkList actual) { actual.ShouldSatisfyAllConditions( () => actual.Interval.ShouldBe(60, "Interval"), () => actual.NumberOfLinks.ShouldBe(1, "NumberOfLinks"), () => actual.Id.ShouldBe("3828", "Id"), () => actual.HappyHourStart.ShouldBe(0, "HappyHourStart"), () => actual.HappyHourEnd.ShouldBe(8, "HappyHourEnd"), () => actual.LinkCount.ShouldBe(2, "LinkCount")); var link1 = actual.First(); link1.ShouldSatisfyAllConditions( () => link1.Url.ShouldBe("http://81.95.11.6/download/1811986/1/7875449/805df047b6ed2dd2cfe1cea7a6da49ed/de/Unser_Sandmaennchen_13.08.29_18-54_mdr_6_TVOON_DE.mpg.avi", "Link1 URL"), () => link1.Id.ShouldBe("11272262", "Link1 ID")); var link2 = actual.Last(); link2.ShouldSatisfyAllConditions( () => link2.Url.ShouldBe("http://81.95.11.6/download/1811986/1/7878195/458cd9d2b67c8704ab731ea9853306a2/de/Unser_Sandmaennchen_13.08.30_18-54_mdr_6_TVOON_DE.mpg.avi", "Link2 URL"), () => link2.Id.ShouldBe("11274936", "Link2 ID")); }
public void ShouldParseCorrectly() { const string response = @"INTERVAL=60;NUMBER_OF_LINKS=1;LIST=3828;LINKCOUNT=2;HHSTART=0;HHEND=8; http://81.95.11.6/download/1811986/1/7875449/805df047b6ed2dd2cfe1cea7a6da49ed/de/Unser_Sandmaennchen_13.08.29_18-54_mdr_6_TVOON_DE.mpg.avi;11272262; http://81.95.11.6/download/1811986/1/7878195/458cd9d2b67c8704ab731ea9853306a2/de/Unser_Sandmaennchen_13.08.30_18-54_mdr_6_TVOON_DE.mpg.avi;11274936;"; var actual = LinkList.Parse(response); actual.Interval.ShouldBe(60, "Interval"); actual.NumberOfLinks.ShouldBe(1, "NumberOfLinks"); actual.Id.ShouldBe("3828", "Id"); actual.HappyHourStart.ShouldBe(0, "HappyHourStart"); actual.HappyHourEnd.ShouldBe(8, "HappyHourEnd"); actual.LinkCount.ShouldBe(2, "LinkCount"); var link1 = actual.First(); var link2 = actual.Last(); link1.Url.ShouldBe("http://81.95.11.6/download/1811986/1/7875449/805df047b6ed2dd2cfe1cea7a6da49ed/de/Unser_Sandmaennchen_13.08.29_18-54_mdr_6_TVOON_DE.mpg.avi", "Link1 URL"); link1.Id.ShouldBe("11272262", "Link1 ID"); link2.Url.ShouldBe("http://81.95.11.6/download/1811986/1/7878195/458cd9d2b67c8704ab731ea9853306a2/de/Unser_Sandmaennchen_13.08.30_18-54_mdr_6_TVOON_DE.mpg.avi", "Link2 URL"); link2.Id.ShouldBe("11274936", "Link2 ID"); }