1 20 package org.enhydra.barracuda.core.comp; 21 22 import java.io.*; 23 import java.util.*; 24 25 import org.w3c.dom.*; 26 import junit.framework.*; 27 28 import org.enhydra.barracuda.core.util.dom.*; 31 import org.apache.log4j.*; 32 import org.enhydra.barracuda.core.view.*; 33 import org.enhydra.barracuda.examples.xmlc.*; 34 import org.enhydra.barracuda.testbed.*; 35 36 37 40 public class TestCompCreate extends DefaultTestCase { 41 private static String testClass = TestCompCreate.class.getName(); 43 private static Logger logger = Logger.getLogger("test."+testClass); 44 45 47 51 public TestCompCreate(String name) { 52 super(name); 53 } 54 55 62 public static void main(String args[]) { 63 TestUtil.parseParams(args); 65 66 if (TestUtil.BATCH_MODE) junit.textui.TestRunner.main(new String [] {testClass}); 68 else junit.swingui.TestRunner.main(new String [] {testClass}); 69 } 70 71 72 78 81 public void testBComponentCreate() { 82 BComponent comp = new BComponent(); 84 85 performGeneralChecks(comp); 87 } 88 89 92 public void testBTextCreate() { 93 BText comp = new BText(); 95 96 performGeneralChecks(comp); 98 } 99 100 103 public void testBActionCreate() { 104 BAction comp = new BAction(); 106 107 performGeneralChecks(comp); 109 } 110 111 114 public void testBLinkCreate() { 115 BLink comp = new BLink(); 117 118 performGeneralChecks(comp); 120 } 121 122 125 public void testBInputCreate() { 126 BInput comp = new BInput(); 128 129 performGeneralChecks(comp); 131 } 132 133 136 public void testBToggleButtonCreate() { 137 BToggleButton comp = new BToggleButton(); 139 140 performGeneralChecks(comp); 142 } 143 144 147 public void testBTemplateCreate() { 148 BTemplate comp = new BTemplate(); 150 151 performGeneralChecks(comp); 153 } 154 155 158 public void testBTableCreate() { 159 BTable comp = new BTable(); 161 162 performGeneralChecks(comp); 164 } 165 166 169 public void testBListCreate() { 170 BList comp = new BList(); 172 173 performGeneralChecks(comp); 175 } 176 177 180 public void testBSelectCreate() { 181 BSelect comp = new BSelect(); 183 184 performGeneralChecks(comp); 186 } 187 188 protected void performGeneralChecks(BComponent comp) { 189 assertNull("Default component name not null", comp.getName()); 195 } 196 } 197 | Popular Tags |