Ejemplo n.º 1
0
 public void CreateAbsolutePath_WhenRelativePathIsHttpsQualifiedUrl_ReturnsRelativePath()
 {
     Assert.AreEqual("https://MyApp/MyPath", WebUtils.CreateAbsolutePath(null, "https://MyApp/MyPath"));
     Assert.AreEqual("https://MyApp/MyPath", WebUtils.CreateAbsolutePath("/", "https://MyApp/MyPath"));
     Assert.AreEqual("https://MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp", "https://MyApp/MyPath"));
     Assert.AreEqual("https://MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp/", "https://MyApp/MyPath"));
 }
Ejemplo n.º 2
0
 public void CreateAbsolutePath_WhenRelativePathBeginsWithApplicationPath_ReturnsConcatenatedPath()
 {
     Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp", "/MyApp/MyPath"));
 }
Ejemplo n.º 3
0
 public void CreateAbsolutePath_RootApplicationPathAndAppRootRelativePath_ReturnsRelativePath()
 {
     Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath("/", "~/MyPath"));
 }
Ejemplo n.º 4
0
 public void CreateAbsolutePath_ApplicationPathWithTrailingSlashAndAppRootRelativePath_ReturnsConcatenatedPath()
 {
     Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp/", "~/MyPath"));
 }
Ejemplo n.º 5
0
 public void CreateAbsolutePath_EmptyApplicationPath_ReturnsRelativePath()
 {
     Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(string.Empty, "/MyPath"));
 }
Ejemplo n.º 6
0
 public void CreateAbsolutePath_NullApplicationPath_ReturnsRelativePath()
 {
     Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(null, "/MyPath"));
 }
Ejemplo n.º 7
0
 public void CreateAbsolutePath_EmptyRelativePath_ReturnsApplicationPath()
 {
     Assert.AreEqual("/MyApp/", WebUtils.CreateAbsolutePath("/MyApp", string.Empty));
 }
Ejemplo n.º 8
0
 public void CreateAbsolutePath_NullRelativePath_ReturnsApplicationPath()
 {
     Assert.AreEqual("/MyApp/", WebUtils.CreateAbsolutePath("/MyApp", null));
 }
Ejemplo n.º 9
0
 public void CreateAbsolutePath_RootApplicationPathAndNullRelativePath_ReturnsRootPath()
 {
     Assert.AreEqual("/", WebUtils.CreateAbsolutePath("/", null));
 }