public void CreatePartUriCreatesUriFromPath() { // Act Uri uri = UriUtility.CreatePartUri(@"a\b\c.txt"); // Assert Assert.Equal(new Uri("/a/b/c.txt", UriKind.Relative).ToString(), uri.ToString()); }
public void CreatePartUriEncodesUri() { // Act Uri uri = UriUtility.CreatePartUri(@"My awesome projects\C#.NET\?123\foo.txt"); // Assert Assert.Equal(@"/My%20awesome%20projects/C%23.NET/%3F123/foo.txt", uri.ToString()); }