public void TestMethod2() { // Arrange MaximumDepthofBinaryTree question = new MaximumDepthofBinaryTree(); int expected = 0; // Act int actual = question.MaxDepth(null); // Assert Assert.AreEqual(expected, actual); }
public void TestMethod3() { // Arrange MaximumDepthofBinaryTree question = new MaximumDepthofBinaryTree(); TreeNode root = new TreeNode(3); int expected = 1; // Act int actual = question.MaxDepth(root); // Assert Assert.AreEqual(expected, actual); }
public void TestMethod1() { // Arrange MaximumDepthofBinaryTree question = new MaximumDepthofBinaryTree(); TreeNode root = new TreeNode(3); root.left = new TreeNode(9); root.right = new TreeNode(20); root.right.left = new TreeNode(15); root.right.right = new TreeNode(7); int expected = 3; // Act int actual = question.MaxDepth(root); // Assert Assert.AreEqual(expected, actual); }