1 7 8 package org.jdesktop.jdnc.markup; 9 10 import java.net.URL ; 11 import java.net.MalformedURLException ; 12 13 import javax.swing.SwingConstants ; 14 15 import junit.framework.TestCase; 16 17 import net.openmarkup.ObjectRealizer; 18 19 import org.jdesktop.jdnc.markup.ElementTypes; 20 21 import org.jdesktop.jdnc.JNTreeTable; 22 23 26 public class TreeTableTest extends TestCase { 27 28 private ObjectRealizer realizer; 29 30 protected void setUp() { 31 realizer = RealizerUnitTest.createObjectRealizer(); 32 realizer.add(ElementTypes.get()); 33 } 34 35 protected void tearDown() { 36 realizer = null; 37 } 38 39 42 private JNTreeTable getTreeTable(String resource) throws Exception { 43 URL url = RealizerUnitTest.class.getResource(resource); 44 assertNotNull(url); 45 46 Object obj = realizer.getObject(url); 47 assertNotNull(obj); 48 assertTrue(obj.getClass().toString() + " is not a JNTreeTable", 49 obj instanceof JNTreeTable); 50 51 return (JNTreeTable) obj; 52 } 53 54 55 59 public void testTreeTable() throws Exception { 60 getTreeTable("resources/treetable00.xml"); 61 } 62 } 63 64 65 | Popular Tags |