Created
March 15, 2013 21:13
-
-
Save CaglarGonul/5173144 to your computer and use it in GitHub Desktop.
Simple BinaryTree tester
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.cgon.BinaryTree; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class JUnitTest { | |
BinaryTree node1 = new BinaryTree(2,null,null); | |
BinaryTree node2 = new BinaryTree(3,null,null); | |
BinaryTree node3 = new BinaryTree(4, node1, node2); | |
BinaryTree node4 = new BinaryTree(5, null, null); | |
BinaryTree root = new BinaryTree(6, node3, node4); | |
@Test | |
public void test_sum(){ | |
assertEquals(20, root.sumAll()); | |
System.out.println(root.toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment