1 26 27 package net.sourceforge.groboutils.autodoc.v1.testserver; 28 29 import net.sourceforge.groboutils.autodoc.v1.*; 30 31 import org.easymock.EasyMock; 33 import org.easymock.MockControl; 34 import net.sourceforge.groboutils.junit.v1.iftc.*; 35 import junit.framework.Test; 36 import junit.framework.TestCase; 37 import junit.framework.TestSuite; 38 39 40 47 public class TestDataFactoryUTestI extends InterfaceTestCase 48 { 49 52 private static final Class THIS_CLASS = TestDataFactoryUTestI.class; 53 55 public TestDataFactoryUTestI( String name, ImplFactory f ) 56 { 57 super( name, TestDataFactory.class, f ); 58 } 59 60 61 public TestDataFactory createTestDataFactory() 62 { 63 return (TestDataFactory)createImplObject(); 64 } 65 66 67 70 71 public void testCreateTestData1() 72 { 73 TestDataFactory tdf = createTestDataFactory(); 74 try 75 { 76 tdf.createTestData( null ); 77 fail("did not throw IllegalArgumentException."); 78 } 79 catch (IllegalArgumentException e) 80 { 81 } 83 } 84 85 86 public void testCreateTestData2() 87 { 88 DefaultTestInfo dti = new DefaultTestInfo(); 89 TestDataFactory tdf = createTestDataFactory(); 90 TestData td = tdf.createTestData( dti ); 91 assertNotNull( 92 "factory "+tdf+" returned null.", 93 td ); 94 } 95 96 97 98 101 102 public static InterfaceTestSuite suite() 103 { 104 InterfaceTestSuite suite = new InterfaceTestSuite( THIS_CLASS ); 105 106 return suite; 107 } 108 109 public static void main( String [] args ) 110 { 111 String [] name = { THIS_CLASS.getName() }; 112 113 116 junit.textui.TestRunner.main( name ); 117 } 118 119 120 124 protected void setUp() throws Exception 125 { 126 super.setUp(); 127 128 } 130 131 132 136 protected void tearDown() throws Exception 137 { 138 140 141 super.tearDown(); 142 } 143 } 144 145 | Popular Tags |