Beispiel #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"));
 }
Beispiel #2
0
 public void CreateAbsolutePath_WhenRelativePathBeginsWithApplicationPath_ReturnsConcatenatedPath()
 {
     Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp", "/MyApp/MyPath"));
 }
Beispiel #3
0
 public void CreateAbsolutePath_RootApplicationPathAndAppRootRelativePath_ReturnsRelativePath()
 {
     Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath("/", "~/MyPath"));
 }
Beispiel #4
0
 public void CreateAbsolutePath_ApplicationPathWithTrailingSlashAndAppRootRelativePath_ReturnsConcatenatedPath()
 {
     Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp/", "~/MyPath"));
 }
Beispiel #5
0
 public void CreateAbsolutePath_EmptyApplicationPath_ReturnsRelativePath()
 {
     Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(string.Empty, "/MyPath"));
 }
Beispiel #6
0
 public void CreateAbsolutePath_NullApplicationPath_ReturnsRelativePath()
 {
     Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(null, "/MyPath"));
 }
Beispiel #7
0
 public void CreateAbsolutePath_EmptyRelativePath_ReturnsApplicationPath()
 {
     Assert.AreEqual("/MyApp/", WebUtils.CreateAbsolutePath("/MyApp", string.Empty));
 }
Beispiel #8
0
 public void CreateAbsolutePath_NullRelativePath_ReturnsApplicationPath()
 {
     Assert.AreEqual("/MyApp/", WebUtils.CreateAbsolutePath("/MyApp", null));
 }
Beispiel #9
0
 public void CreateAbsolutePath_RootApplicationPathAndNullRelativePath_ReturnsRootPath()
 {
     Assert.AreEqual("/", WebUtils.CreateAbsolutePath("/", null));
 }