1 4 package org.oddjob.designer.factory; 5 6 import junit.framework.TestCase; 7 8 import org.oddjob.designer.elements.ListDE; 9 import org.oddjob.designer.model.DesignElementType; 10 11 14 public class DesignFactoryTest extends TestCase { 15 16 public void testLoad() { 17 assertTrue("some defs", DesignFactory.childActions(new Object (), "").size() > 0); 18 } 19 20 public void testCreateComponent() throws ClassNotFoundException { 21 assertNotNull("Should create something", 22 DesignFactory.createComponent(DesignFactory.UNKNOWN_TAG)); 23 } 24 25 public void testCreateType() throws ClassNotFoundException { 26 DesignElementType list = DesignFactory.createType("list"); 27 28 assertNotNull("Should create something", list); 29 assertTrue(list.supportedTypes().length > 1); 30 31 } 32 33 public void testNullCreate() throws ClassNotFoundException { 34 assertNull("Should be null", DesignFactory.createComponent("rubbish")); 35 } 36 37 public void testActions() { 38 SimpleHierarchy sh = DesignFactory.childActions(this, "whatever"); 39 System.out.println(sh.size()); 40 assertTrue("Some hierarchy", sh.size() > 0); 41 } 42 43 public void testSupportedTypes() { 44 assertTrue("some types", DesignFactory. 45 supportedTypes(ListDE.class).length > 2); 46 } 47 } 48 | Popular Tags |