public void TestRetrieveKnownItemList() { #if RunConnectedTests Uri url = new Uri(SOURCE_FORGE_MAIN_TRACKER_URL); TrackerItemListTester tester = new TrackerItemListTester(url); TrackerItem[] items = tester.TestParseTrackerItemListFromUrl(1); foreach (TrackerItem item in items) { Console.WriteLine(item.DateOpened.ToShortDateString() + " " + item.Summary); } Assert.AreEqual(1, items.Length, "Wrong number of items returned."); Assert.AreNotEqual("", items[0].ID, "Tracker item ID was blank."); #else Assert.Ignore(TestingMessages.DisconnectedTestsMessage); #endif }
public void TestParseSourceForgeMainTrackerUrl() { #if RunConnectedTests Uri url = new Uri(SOURCE_FORGE_MAIN_TRACKER_URL); TrackerItemListTester tester = new TrackerItemListTester(url); tester.TestParseTrackerItemListUrlsFromUrl(); #else Assert.Ignore(TestingMessages.DisconnectedTestsMessage); #endif }
public void TestParseKnownHtmlList() { TrackerItemListTester tester = new TrackerItemListTester(KNOWN_HTML_LIST); Uri[] urls = tester.TestParseTrackerItemListUrls(); Assert.AreEqual(4, urls.Length, "Wrong number of URLs returned."); Assert.AreEqual("http://sourceforge.net/tracker/index.php?func=detail&aid=1305191&group_id=118003&atid=679758", urls[0].AbsoluteUri, "One or more of the URLs returned was incorrect."); }