public void TestIsMainPageUriInvalid(string domain) { HtmlDocumentParser htmlDocumentParser = new HtmlDocumentParser(); // Assert Assert.Throws <UriFormatException>(() => htmlDocumentParser.IsMainPage(domain)); }
public void TestIsMainPage(string domain, bool b) { // Arrange HtmlDocumentParser htmlDocumentParser = new HtmlDocumentParser(); // Act if (!domain.StartsWith("http")) { domain = Uri.UriSchemeHttp + Uri.SchemeDelimiter + domain; } bool result = htmlDocumentParser.IsMainPage(domain); // Assert Assert.AreEqual(result, b); }