Skip to content

Commit 8b2a4f5

Browse files
add test for 107
1 parent c96fbf9 commit 8b2a4f5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.common.classes.TreeNode;
4+
import com.fishercoder.common.utils.CommonUtils;
5+
import com.fishercoder.common.utils.TreeUtils;
6+
import com.fishercoder.solutions._107;
7+
import org.junit.BeforeClass;
8+
import org.junit.Test;
9+
10+
import java.util.Arrays;
11+
12+
public class _107Test {
13+
private static _107.Solution1 solution1;
14+
private static TreeNode root;
15+
16+
@BeforeClass
17+
public static void setup() {
18+
solution1 = new _107.Solution1();
19+
}
20+
21+
@Test
22+
public void test1() {
23+
root = TreeUtils.constructBinaryTree(Arrays.asList(3, 9, 20, null, null, 15, 7));
24+
TreeUtils.printBinaryTree(root);
25+
CommonUtils.printListList(solution1.levelOrder(root));
26+
}
27+
28+
}

0 commit comments

Comments
 (0)