public void GetEffectivePath_ProperConcatenation(string baseUriString, string pathSections, string specifiedPath, string expectedResult) { Uri baseUri = new Uri(baseUriString); Uri result = HttpState.GetEffectivePath(baseUri, pathSections, specifiedPath); Assert.Equal(expectedResult, result.ToString(), StringComparer.OrdinalIgnoreCase); }
public void GetEffectivePath_NullBaseAddressAndNoPath_Throws() { HttpState httpState = SetupHttpState(); httpState.BaseAddress = null; Assert.Throws <ArgumentNullException>("baseAddress", () => httpState.GetEffectivePath("")); }
public void GetEffectivePath_NoBaseAddressOrAbsoluteUri_ThrowsArgumentNullException() { Assert.Throws <ArgumentNullException>(() => HttpState.GetEffectivePath(null, "", "/NotAnAbsoluteUri")); }