public void TravelTest() { var nfsRoot = this.nfs.Root; int count = nfsRoot.Folders.Count() + 1; Assert.AreEqual(count, travelFolder(nfsRoot), "flatten"); var builder = new NFSTreeBuilder(this.nfs.Root, this.branchesManager); var builtNFSRoot = builder.Build(new ProgressReporterInConsole()); Assert.AreEqual(count, travelFolder(builtNFSRoot), "built"); }
public Model.FolderData BuildNFSRoot() { lock (loadingLock) { var report = this.report; var reporter = this.reporter; var nfsFolderRoot = this.LoadNFSFolderRoot(); var branchesManager = this.LoadBranches(); var builder = new NFSTreeBuilder(nfsFolderRoot, branchesManager); var root = builder.Build(reporter); return(new Model.FolderData(root, null)); } }
public void BuildNFSRoot() { var builder = new NFSTreeBuilder(this.nfs.Root, this.branchesManager); var nfsFolderRoot = builder.Build(new ProgressReporterInConsole()); //silly way to get PreparedFolderRoot new GenerateFoldersFromBranches().GenerateDataWinFolderTree(); //var preparedFolderTest = new PreparedRootTest(); //preparedFolderTest.ReadPreparedRoot(); //var preparedFolderRoot = preparedFolderTest.Root; //bool areEquals = new FolderTreeComparer().AreEqual( // nfsFolderRoot, // preparedFolderRoot, // FolderTreeCompareLevel.Folder); //Assert.IsTrue(areEquals, "two root are not same"); }