1 26 27 package net.sourceforge.groboutils.pmti.v1.autodoc.v1; 28 29 import org.easymock.EasyMock; 30 import org.easymock.MockControl; 31 import junit.framework.Test; 32 import junit.framework.TestCase; 33 import junit.framework.TestSuite; 34 import net.sourceforge.groboutils.autodoc.v1.testserver.DefaultTestInfo; 35 import net.sourceforge.groboutils.autodoc.v1.testserver.TestDataFactoryUTestI; 36 import net.sourceforge.groboutils.junit.v1.iftc.*; 37 import junit.framework.AssertionFailedError; 38 39 40 47 public class DefaultTestDataFactoryUTest extends TestCase 48 { 49 52 private static final Class THIS_CLASS = DefaultTestDataFactoryUTest.class; 53 55 public DefaultTestDataFactoryUTest( String name ) 56 { 57 super( name ); 58 } 59 60 61 64 68 protected void setUp() throws Exception 69 { 70 super.setUp(); 71 72 } 74 75 76 79 80 public void testCreate1() 81 { 82 DefaultTestDataFactory f = new DefaultTestDataFactory(); 83 assertTrue( 84 "not correct type.", 85 f.createTestData( new DefaultTestInfo( "", "" ) ) 86 instanceof ITFTestData ); 87 } 88 89 90 91 94 95 98 99 public static Test suite() 100 { 101 InterfaceTestSuite suite = TestDataFactoryUTestI.suite(); 102 suite.addTestSuite( THIS_CLASS ); 103 suite.addFactory( new CxFactory( "A" ) { 104 public Object createImplObject() { 105 return new DefaultTestDataFactory(); 106 } 107 } ); 108 109 return suite; 110 } 111 112 public static void main( String [] args ) 113 { 114 String [] name = { THIS_CLASS.getName() }; 115 116 119 junit.textui.TestRunner.main( name ); 120 } 121 122 123 127 protected void tearDown() throws Exception 128 { 129 131 132 super.tearDown(); 133 } 134 } 135 136 | Popular Tags |