public void TestMethod9() { var baseUrl = "http://www.demo.com/test/index.html"; var relativeUrl = "/Next/default.html"; var baseUri = baseUrl.ToUri(); var url = RelativeHelper.RelativePathToUrl(baseUri, relativeUrl); Assert.IsTrue(url.IsEquals("http://www.demo.com/Next/default.html")); }
public void TestMethod3() { var baseUrl = "http://www.demo.com/index.html"; var relativeUrl = "Home/Index"; var baseUri = baseUrl.ToUri(); var url = RelativeHelper.RelativePathToUrl(baseUri, relativeUrl); Assert.IsTrue(url.IsEquals("http://www.demo.com/Home/Index")); }
public void TestMethod4() { var baseUrl = "http://www.demo.com/index.html"; string relativeUrl = null; var baseUri = baseUrl.ToUri(); var url = RelativeHelper.RelativePathToUrl(baseUri, relativeUrl); Assert.IsTrue(url.IsEquals("http://www.demo.com/index.html")); }
public void TestMethod18() { var baseUrl = "http://www.demo.com/demo/test/index.html"; var relativeUrl = "../../../td/rr/ww/def.html"; var baseUri = baseUrl.ToUri(); var url = RelativeHelper.RelativePathToUrl(baseUri, relativeUrl); Assert.IsTrue(url.IsEquals("http://www.demo.com/td/rr/ww/def.html")); }