コード例 #1
0
        public void Url_WhenHttpContextContainsRawUrl_UrlShouldReturnRawUrl()
        {
            string url = "x.jpg";

            using (var mockHttpContext = new MockHttpContext(@"C:\Intepub\wwwroot\", "/", url, ""))
            {
                var threadtailHttpContext = new ThreadtailHttpContext(HttpContext.Current);

                Assert.AreEqual(threadtailHttpContext.Url, "/" + url);
            }
        }
コード例 #2
0
        public void BrowserName_WhenHttpContextContainsBrowserName_TheBrowserNameShouldBeReturned()
        {
            string url = "x.jpg";

            using (var mockHttpContext = new MockHttpContext(@"C:\Intepub\wwwroot\", "/", url, ""))
            {
                var threadtailHttpContext = new ThreadtailHttpContext(HttpContext.Current);

                Assert.AreEqual(threadtailHttpContext.Url, "/" + url);
            }
        }