1 package com.tonbeller.jpivot.test.olap; 2 3 import junit.framework.TestCase; 4 5 10 public class DimensionBuilderTest extends TestCase { 11 12 16 public DimensionBuilderTest(String arg0) { 17 super(arg0); 18 } 19 20 public static void main(String [] 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 []{"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 |