Exemple #1
0
        public void Test_RBTREE_INSERT()
        {
            RbTree rbTree = new RbTree();

            System.Collections.Generic.IList <IDirectoryEntry> repo = GetDirectoryRepository(25);

            foreach (var item in repo)
            {
                rbTree.Insert(item);
            }

            for (int i = 0; i < repo.Count; i++)
            {
                IRbNode c;
                rbTree.TryLookup(DirectoryEntry.Mock(i.ToString(), StgType.StgInvalid), out c);
                Assert.IsTrue(c is IDirectoryEntry);
                Assert.IsTrue(((IDirectoryEntry)c).Name == i.ToString());
                //Assert.IsTrue(c.IsStream);
            }
        }