Пример #1
0
        public void IsSymmetricTest_Null()
        {
            var solution = new _101_SymmetricTree();

            Assert.IsTrue(solution.IsSymmetric(null));
        }
Пример #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 })));
        }
Пример #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 })));
        }