예제 #1
0
 @Before
 public void setUp() {
   bintree = new BinaryTree();
   bintree.insert(14);
   bintree.insert(17);
   bintree.insert(2);
   bintree.insert(19);
   bintree.insert(15);
   bintree.insert(3);
 }
예제 #2
0
 @Test
 public void lisääminenKasvattaaKokoa() {
   int size = bintree.getSize();
   bintree.insert(5);
   int size2 = bintree.getSize();
   assertEquals(size2, size + 1);
 }
예제 #3
0
 @Test
 public void eiVoiLisätäJosOnJo() {
   int size = bintree.getSize();
   bintree.insert(3);
   int size2 = bintree.getSize();
   assertEquals(size2, size);
 }