Exemple #1
0
        public void SubFeed_VerifySubFeedPath()
        {
            using (var target = new TestFolder())
                using (var cache = new LocalCache())
                {
                    var root       = UriUtility.CreateUri(target.Root, "feedA");
                    var fileSystem = new PhysicalFileSystem(cache, root, root, feedSubPath: "feedA");

                    fileSystem.Root.Should().Be(UriUtility.EnsureTrailingSlash(root));
                    fileSystem.LocalRoot.Should().StartWith(Path.Combine(target.Root, "feedA"));

                    fileSystem.Get("index.json").EntityUri.Should().Be(UriUtility.GetPath(root, "index.json"));
                }
        }
Exemple #2
0
 public void UriUtility_EnsureTrailingSlash(string uri, string expected)
 {
     Assert.Equal(expected, UriUtility.EnsureTrailingSlash(new Uri(uri)).AbsoluteUri);
 }