package com.geth1b.coding.skills.lc;

import com.geth1b.coding.ds.TreeNode;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;

/**
 * @author geth1b
 */
public class _104_MaxDepthBinaryTree_Test {
  private _104_MaxDepthBinaryTree solution;
  
  @Before public void setUp() {
    solution = new _104_MaxDepthBinaryTree();
  }
  
  @Test public void maxDepth() {
    TreeNode root = TreeNode.create("1234567##8#9".toCharArray()); // 4
    assertEquals(4, solution.maxDepth(root));
  }
  
  @Test public void maxDepth_empty() {
    assertEquals(0, solution.maxDepth(null));
  }  
}
