KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > test > olap > DimensionBuilderTest


1 package com.tonbeller.jpivot.test.olap;
2
3 import junit.framework.TestCase;
4
5 /**
6  * Created on 22.10.2002
7  *
8  * @author av
9  */

10 public class DimensionBuilderTest extends TestCase {
11
12   /**
13    * Constructor for DimensionBuilderTest.
14    * @param arg0
15    */

16   public DimensionBuilderTest(String JavaDoc arg0) {
17     super(arg0);
18   }
19
20   public static void main(String JavaDoc[] args) {
21     junit.textui.TestRunner.run(DimensionBuilderTest.class);
22   }
23
24   public void testBuild() {
25     DimensionBuilder db = new DimensionBuilder();
26     
27     TestDimension td = db.build("test", new String JavaDoc[]{"level-a", "level-b"}, new int[] {2, 3});
28     TestHierarchy th = (TestHierarchy)td.getHierarchies()[0];
29     assertEquals(2, th.getRootMembers().length);
30     assertEquals(3, th.getRootMembers()[1].getChildMember().size());
31   }
32
33 }
34
Popular Tags