コード例 #1
0
        public void ComparerTimeStruct_Test(Time[] source, Time[] NLR, Time[] LNR, Time[] LRN, IComparer <Time> comparer)
        {
            var tree  = new TreeCollection <Time>(source, comparer);
            var test  = tree.NLR();
            var test1 = tree.LNR();
            var test2 = tree.LRN();

            CollectionAssert.AreEqual(tree.NLR(), NLR);
            CollectionAssert.AreEqual(tree.LNR(), LNR);
            CollectionAssert.AreEqual(tree.LRN(), LRN);
        }
コード例 #2
0
        public void ComparerBookWithComparer_Test(Book[] source, Book[] NLR, Book[] LNR, Book[] LRN, IComparer <Book> comparer)
        {
            var tree = new TreeCollection <Book>(source, comparer);

            CollectionAssert.AreEqual(tree.NLR(), NLR);
            CollectionAssert.AreEqual(tree.LNR(), LNR);
            CollectionAssert.AreEqual(tree.LRN(), LRN);
        }
コード例 #3
0
        public void ComparerString_Test(string[] source, string[] NLR, string[] LNR, string[] LRN, IComparer <string> comparer)
        {
            var tree = new TreeCollection <string>(source, comparer);

            CollectionAssert.AreEqual(tree.NLR(), NLR);
            CollectionAssert.AreEqual(tree.LNR(), LNR);
            CollectionAssert.AreEqual(tree.LRN(), LRN);
        }
コード例 #4
0
        public void ComparerInt32_Test(int[] source, int[] NLR, int[] LNR, int[] LRN, IComparer <int> comparer)
        {
            var tree = new TreeCollection <int>(source, comparer);

            CollectionAssert.AreEqual(tree.NLR(), NLR);
            CollectionAssert.AreEqual(tree.LNR(), LNR);
            CollectionAssert.AreEqual(tree.LRN(), LRN);
        }
コード例 #5
0
        public void NLR_Test()
        {
            IEnumerable <T> result = _tree.NLR();

            Assert.AreEqual(NLR, _tree.NLR());
        }