-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy path_116Test.java
40 lines (34 loc) · 1.04 KB
/
_116Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.fishercoder.firstthousand;
import com.fishercoder.solutions.firstthousand._116;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class _116Test {
private _116.Solution1 solution1;
private _116.Solution2 solution2;
private _116.Node root;
@BeforeEach
public void setup() {
solution1 = new _116.Solution1();
solution2 = new _116.Solution2();
}
@Test
public void test1() {
root = new _116.Node(1);
root.left = new _116.Node(2);
root.right = new _116.Node(3);
root.left.left = new _116.Node(4);
root.left.right = new _116.Node(5);
root.right.right = new _116.Node(7);
solution1.connect(root);
}
@Test
public void test2() {
root = new _116.Node(1);
root.left = new _116.Node(2);
root.right = new _116.Node(3);
root.left.left = new _116.Node(4);
root.left.right = new _116.Node(5);
root.right.right = new _116.Node(7);
solution2.connect(root);
}
}