public void ReturnSiteRelativeAddressGivenBaseUrlNull() { var config = new AlternateWebRootConfiguration(); var address = "~/myfile.png"; var result = AlternateWebRoot.Apply(address, config); Assert.AreEqual(address.Substring(1), result); }
public void ReturnValueGivenIsIncludingSiteRelativePaths(string baseAddress, string relativeAddress, string expectedAddress) { var config = new AlternateWebRootConfiguration { BaseUrl = new Uri(baseAddress), IsIncludingSiteRelativePaths = true, }; var result = AlternateWebRoot.Apply(relativeAddress, config); Assert.AreEqual(expectedAddress, result); }
public void ThrowExceptionGivenNullAddress() { AlternateWebRoot.Apply(null); Assert.Fail("An exception should have been thrown."); }