Beispiel #1
0
        public void IsSymmetricTest_Null()
        {
            var solution = new _101_SymmetricTree();

            Assert.IsTrue(solution.IsSymmetric(null));
        }
Beispiel #2
0
        public void IsSymmetricTest()
        {
            var solution = new _101_SymmetricTree();

            Assert.IsTrue(solution.IsSymmetric(TestHelper.GenerateTree(new int?[] { 1, 2, 2, 3, 4, 4, 3 })));
        }
Beispiel #3
0
        public void IsSymmetricTest_ValueDifferent()
        {
            var solution = new _101_SymmetricTree();

            Assert.IsFalse(solution.IsSymmetric(TestHelper.GenerateTree(new int?[] { 1, 2, 2, null, 3, 4 })));
        }