コード例 #1
0
        public void AddRange_TwoSameElementsAlternativeTraverse_ShouldThrowArgumentException()
        {
            var st = new SortedTree <int>(true);

            Assert.Throws <ArgumentException>(() => st.AddRange(new List <int> {
                3, 23, 3,
            }));
        }
コード例 #2
0
        public void AddRage_MultipleElementsAlternativeTraverse_ShouldSortWhenTravers()
        {
            var st = new SortedTree <int>(true);

            st.AddRange(new List <int> {
                3, 23, 52, 1, 44, 11, 9
            });

            CollectionAssert.AreEqual(new List <int> {
                1, 3, 9, 11, 23, 44, 52
            }, st.Traverse());
        }
コード例 #3
0
        public void AddRange_NullPassedAsElements_ShouldThrowArgumentException()
        {
            var st = new SortedTree <int>();

            Assert.Throws <ArgumentException>(() => st.AddRange(null));
        }
コード例 #4
0
        public void AddRange_NullPassedAsElementsAlternativeTraverse_ShouldThrowArgumentException()
        {
            var st = new SortedTree <int>(true);

            Assert.Throws <ArgumentException>(() => st.AddRange(null));
        }