- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInvertBinaryTreeTest.java
More file actions
Latest commit
38 lines (37 loc) · 985 Bytes
/
Copy pathInvertBinaryTreeTest.java
File metadata and controls
38 lines (37 loc) · 985 Bytes
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
importorg.example.helpers.TreeNode;
importorg.example.problems.invert_binary_tree.Solution;
importorg.junit.jupiter.api.Assertions;
importorg.junit.jupiter.api.Test;
publicclassInvertBinaryTreeTest {
@Test
publicvoidtest() {
TreeNodetree = newTreeNode(
4,
newTreeNode(
2,
newTreeNode(1),
newTreeNode(3)
),
newTreeNode(
7,
newTreeNode(6),
newTreeNode(9)
)
);
TreeNodeexpected = newTreeNode(
4,
newTreeNode(
7,
newTreeNode(9),
newTreeNode(6)
),
newTreeNode(
2,
newTreeNode(3),
newTreeNode(1)
)
);
Solutions = newSolution();
Assertions.assertTrue(s.invertTree(tree).equals(expected));
}
}