public void GetCSS_DoesNotCallWebDownloader_WhenSchemeNotSupported() { string path = "chrome-extension://fcdjadjbdihbaodagojiomdljhjhjfho/css/atd.css"; LinkTagCssSource sut = CreateSUT(path: path); sut.GetCss(); _webDownloader.Verify(w => w.DownloadString(new Uri(path)), Times.Never); }
public void GetCSS_AbsoluteUrlInHref_CallsWebDownloader_WithSpecifiedPath() { string path = "http://b.co/a.css"; LinkTagCssSource sut = CreateSUT(path: path); sut.GetCss(); _webDownloader.Verify(w => w.DownloadString(new Uri(path))); }
public void GetCSS_CallsWebDownloader_WithSpecifiedPath() { string path = "b.css"; LinkTagCssSource sut = CreateSUT(path: path); sut.GetCss(); _webDownloader.Verify(w => w.DownloadString(It.Is <Uri>(u => u.PathAndQuery == "/" + path))); }
public void GetCSS_CallsWebDownloader_WithSpecifiedBundle() { string path = "/Content/css?v=7V7TZzP9Wo7LiH9_q-r5mRBdC_N0lA_YJpRL_1V424E1"; LinkTagCssSource sut = CreateSUT(path: path, link: "<link href=\"{0}\" rel=\"stylesheet\"/>"); sut.GetCss(); _webDownloader.Verify(w => w.DownloadString(It.Is <Uri>(u => u.PathAndQuery == path))); }
public void GetCSS_CallsWebDownloader_WithSpecifiedDomain() { string baseUrl = "http://a.co"; LinkTagCssSource sut = CreateSUT(baseUrl: baseUrl); sut.GetCss(); _webDownloader.Verify(w => w.DownloadString(It.Is <Uri>(u => u.Scheme == "http" && u.Host == "a.co"))); }