KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > tree > TestTreeModelTest


1 package com.tonbeller.wcf.tree;
2
3
4
5 /**
6  * @author av
7  */

8 public class TestTreeModelTest extends NodeCountTestBase {
9   public void testModel() {
10     TestTreeModel ttm = new TestTreeModel();
11     testParentChildConsistence(ttm);
12     assertLevelCount(ttm, 6);
13     assertChildCount(ttm, 0, 3);
14     assertChildCount(ttm, 3, 4);
15     
16     ttm = new TestTreeModel(new int[] { 1, 2, 3 });
17     testParentChildConsistence(ttm);
18     assertLevelCount(ttm, 3);
19     assertChildCount(ttm, 0, 1);
20     assertChildCount(ttm, 1, 2);
21     assertChildCount(ttm, 2, 3);
22   }
23
24 }
25
Popular Tags