public void IsUrlValid_ValidUrl_ReturnTrue() { _testObject = new WebPageAdapter(); var isUrlValid = _testObject.IsUrlValid(ValidUrl); Assert.IsTrue(isUrlValid); }
public void IsUrlValid_InvalidUrl_ReturnFalse() { _testObject = new WebPageAdapter(); var isUrlValid = _testObject.IsUrlValid(InvalidUrl); Assert.IsFalse(isUrlValid); }
/// <summary> /// Analyze webpage content. /// Fills grid view. /// </summary> private void Analyze() { SetControls(true); if (_webPageAdapter.IsUrlValid(WebPageAddress)) { var keywords = GetKeywordsFromWebpage(); GetOccurrencesOfKeywordsInWebpage(keywords); FillKeywordsGridView(); } else { MessageBox.Show(TextResources.WebpageKeywordsFinderResources.MsgInvalidUrl); } SetControls(false); }