예제 #1
0
        public void Test_Add()
        {
            IBinaryTree <byte> bt = this.CreateInstance(1);

            bt.Add(10);

            Assert.True(bt.Contains(10));
        }
예제 #2
0
        public void Test_Add_When_New()
        {
            IBinaryTree <byte> bt = this.CreateInstance(1);

            bt.Add(100);

            Assert.True(bt.Contains(100));
            Assert.False(bt.IsEmpty);
        }
예제 #3
0
        public void Test_Contains_Throws_InvalidOperation_When_Empty()
        {
            IBinaryTree <byte> bt = this.CreateInstance(1);

            Assert.Throws <InvalidOperationException>(() => bt.Contains(10));
        }