Skip to content

Commit 31b86e6

Browse files
author
xiaoqin0000
committed
add binaryTreeNode TestCast
1 parent 7a12885 commit 31b86e6

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package test.com.java.xiaoqin.impl;
2+
3+
import com.java.xiaoqin.impl.BinaryTreeNode;
4+
import org.junit.After;
5+
import org.junit.Before;
6+
import org.junit.Test;
7+
8+
/**
9+
* BinaryTreeNode Tester.
10+
*
11+
* @author <Authors name>
12+
* @version 1.0
13+
* @since <pre>二月 27, 2017</pre>
14+
*/
15+
public class BinaryTreeNodeTest {
16+
17+
private BinaryTreeNode<Integer> binaryTreeNode;
18+
19+
20+
@Before
21+
public void before() throws Exception {
22+
binaryTreeNode = new BinaryTreeNode<>();
23+
}
24+
25+
@After
26+
public void after() throws Exception {
27+
binaryTreeNode = null;
28+
}
29+
30+
/**
31+
* Method: insert(T o)
32+
*/
33+
@Test
34+
public void testInsert() throws Exception {
35+
binaryTreeNode.insert(5);
36+
binaryTreeNode.insert(2);
37+
binaryTreeNode.insert(7);
38+
binaryTreeNode.insert(1);
39+
binaryTreeNode.insert(6);
40+
System.out.println(binaryTreeNode.toString());
41+
binaryTreeNode.insert(4);
42+
binaryTreeNode.insert(8);
43+
System.out.println(binaryTreeNode.toString());
44+
}
45+
46+
}

0 commit comments

Comments
 (0)