1 26 27 package net.sourceforge.groboutils.autodoc.v1.testserver; 28 29 import net.sourceforge.groboutils.autodoc.v1.*; 30 31 import net.sourceforge.groboutils.junit.v1.iftc.*; 32 import junit.framework.Test; 33 import junit.framework.TestCase; 34 import junit.framework.TestSuite; 35 36 37 44 public class DefaultTestDataUTest extends TestCase 45 { 46 49 private static final Class THIS_CLASS = DefaultTestDataUTest.class; 50 51 public DefaultTestDataUTest( String name ) 52 { 53 super( name ); 54 } 55 56 57 60 64 protected void setUp() throws Exception 65 { 66 super.setUp(); 67 68 } 70 71 72 75 76 public void testConstructor1() 77 { 78 try 79 { 80 new DefaultTestData( null ); 81 fail("did not throw IllegalArgumentException"); 82 } 83 catch (IllegalArgumentException e) 84 { 85 } 87 } 88 89 90 public void testConstructor2() 91 { 92 TestInfo ti = new DefaultTestInfo(); 93 TestData td = new DefaultTestData( ti ); 94 assertEquals( 95 "returned test info did not match constructor's test info.", 96 ti, 97 td.getTestInfo() ); 98 } 99 100 101 104 105 106 109 110 public static Test suite() 111 { 112 InterfaceTestSuite suite = TestDataUTestI.suite(); 113 suite.addTestSuite( THIS_CLASS ); 114 suite.addFactory( new CxFactory( "A" ) { 115 public Object createImplObject() { 116 return new DefaultTestData( new DefaultTestInfo() ); 117 } 118 } ); 119 120 return suite; 121 } 122 123 public static void main( String [] args ) 124 { 125 String [] name = { THIS_CLASS.getName() }; 126 127 130 junit.textui.TestRunner.main( name ); 131 } 132 133 134 138 protected void tearDown() throws Exception 139 { 140 142 super.tearDown(); 143 } 144 } 145 146 | Popular Tags |