public void Combine_UriSegments1_UriInstance() { // Arrange const string baseUri = "http://example.com"; const string path = "test"; // Act var uri = UriBuilderExtensions.Combine( baseUri, path, "/sub-path-with-slashes/" ); // Assert Assert.IsNotNull(uri); Assert.AreEqual($"{baseUri}/{path}/sub-path-with-slashes", uri.ToString()); }
public void Combine_UriSegments5_UriInstance() { // Arrange const string baseUri = "http://example.com"; const string path = "test"; // Act var uri = UriBuilderExtensions.Combine( baseUri, path, "/sub-path-with-slashes/", "filename.ext?", "param1=1", "¶m2=2", "#fragment" ); // Assert Assert.IsNotNull(uri); Assert.AreEqual($"{baseUri}/{path}/sub-path-with-slashes/filename.ext?param1=1¶m2=2#fragment", uri.ToString()); }