public void DefaultKnownUserUrlProvider_GetUrl_MissingSlash_Test()
        {
            //Arrange
            string expectedUrl = "http://some.url/";
            HttpRequest request = new HttpRequest("default.aspx", "http://some.url", null);
            HttpContext.Current = new HttpContext(request, new HttpResponse(null));

            DefaultKnownUserUrlProvider provider = new DefaultKnownUserUrlProvider();

            //Act
            string actualUrl = provider.GetUrl();

            //Assert      
            Assert.AreEqual(expectedUrl, actualUrl);
        }
コード例 #2
0
        public void DefaultKnownUserUrlProvider_GetUrl_MissingSlash_Test()
        {
            //Arrange
            string      expectedUrl = "http://some.url/";
            HttpRequest request     = new HttpRequest("default.aspx", "http://some.url", null);

            HttpContext.Current = new HttpContext(request, new HttpResponse(null));

            DefaultKnownUserUrlProvider provider = new DefaultKnownUserUrlProvider();

            //Act
            string actualUrl = provider.GetUrl();

            //Assert
            Assert.AreEqual(expectedUrl, actualUrl);
        }