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")); }
public void CreateAbsolutePath_WhenRelativePathBeginsWithApplicationPath_ReturnsConcatenatedPath() { Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp", "/MyApp/MyPath")); }
public void CreateAbsolutePath_RootApplicationPathAndAppRootRelativePath_ReturnsRelativePath() { Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath("/", "~/MyPath")); }
public void CreateAbsolutePath_ApplicationPathWithTrailingSlashAndAppRootRelativePath_ReturnsConcatenatedPath() { Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp/", "~/MyPath")); }
public void CreateAbsolutePath_EmptyApplicationPath_ReturnsRelativePath() { Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(string.Empty, "/MyPath")); }
public void CreateAbsolutePath_NullApplicationPath_ReturnsRelativePath() { Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(null, "/MyPath")); }
public void CreateAbsolutePath_EmptyRelativePath_ReturnsApplicationPath() { Assert.AreEqual("/MyApp/", WebUtils.CreateAbsolutePath("/MyApp", string.Empty)); }
public void CreateAbsolutePath_NullRelativePath_ReturnsApplicationPath() { Assert.AreEqual("/MyApp/", WebUtils.CreateAbsolutePath("/MyApp", null)); }
public void CreateAbsolutePath_RootApplicationPathAndNullRelativePath_ReturnsRootPath() { Assert.AreEqual("/", WebUtils.CreateAbsolutePath("/", null)); }