Exemple #1
0
        public void ConvertFileAsEntryToFileRetainsIdentity()
        {
            RootedFileSystemEntry redEntry = this.root.AsRoot.Children.First();
            var redFile = redEntry.ToFileSystemFile();

            Assert.True(redFile.Root.Children.Contains(redFile.AsFileSystemEntry));
            Assert.Same(redEntry.FileSystemEntry, redFile.FileSystemFile);
        }
Exemple #2
0
        public void RedNodeWithBulkMethodOnChild()
        {
            var redRoot    = this.root.AsRoot;
            var firstChild = redRoot.Children.First();
            RootedFileSystemEntry modifiedChild = firstChild.With(pathSegment: "g");

            Assert.Equal("g", modifiedChild.PathSegment);
        }