void InternalTest(int?[] tree, bool expected) { TreeNode root = TreeNode.Get(tree); bool actual = ValidateBST.IsValidBST(root); Assert.Equal <bool>(expected, actual); }
public void ValidateBSTTest(TreeNode <int> root, bool expected) { bool result = ValidateBST.IsValidBST(root, int.MinValue, int.MaxValue); Assert.Equal(expected, result); }