Exemple #1
0
        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");
        }
Exemple #2
0
        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));
            }
        }
Exemple #3
0
        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");
        }