9
9
import static junit .framework .Assert .assertEquals ;
10
10
11
11
public class _538Test {
12
- private static _538 .GenericSolution genericSolution ;
13
- private static _538 .BSTSolution bstSolution ;
12
+ private static _538 .Solution2 solution2 ;
13
+ private static _538 .Solution1 solution1 ;
14
14
private static TreeNode expectedRoot ;
15
15
private static TreeNode root ;
16
16
17
17
@ BeforeClass
18
18
public static void setup () {
19
- bstSolution = new _538 .BSTSolution ();
20
- genericSolution = new _538 .GenericSolution ();
19
+ solution1 = new _538 .Solution1 ();
20
+ solution2 = new _538 .Solution2 ();
21
21
}
22
22
23
23
@ Before
@@ -32,15 +32,15 @@ public void test1() {
32
32
expectedRoot = new TreeNode (18 );
33
33
expectedRoot .left = new TreeNode (20 );
34
34
expectedRoot .right = new TreeNode (13 );
35
- assertEquals (expectedRoot .toString (), genericSolution .convertBST (root ).toString ());
36
- assertEquals (expectedRoot .toString (), bstSolution .convertBST (root ).toString ());
35
+ assertEquals (expectedRoot .toString (), solution2 .convertBST (root ).toString ());
36
+ assertEquals (expectedRoot .toString (), solution1 .convertBST (root ).toString ());
37
37
}
38
38
39
39
@ Test
40
40
public void test2 () {
41
41
root = null ;
42
42
expectedRoot = null ;
43
- assertEquals (expectedRoot , genericSolution .convertBST (root ));
44
- assertEquals (expectedRoot , bstSolution .convertBST (root ));
43
+ assertEquals (expectedRoot , solution2 .convertBST (root ));
44
+ assertEquals (expectedRoot , solution1 .convertBST (root ));
45
45
}
46
46
}
0 commit comments