1 26 27 package net.sourceforge.groboutils.autodoc.v1.testserver; 28 29 import net.sourceforge.groboutils.autodoc.v1.*; 30 31 import org.easymock.EasyMock; 32 import org.easymock.MockControl; 33 import net.sourceforge.groboutils.junit.v1.iftc.*; 34 import junit.framework.Test; 35 import junit.framework.TestCase; 36 import junit.framework.TestSuite; 37 import net.sourceforge.groboutils.autodoc.v1.AutoDoc; 38 39 import java.io.*; 40 41 42 49 public class AbstractWriterServerUTest extends TestCase 50 { 51 54 private static final Class THIS_CLASS = AbstractWriterServerUTest.class; 55 56 public AbstractWriterServerUTest( String name ) 57 { 58 super( name ); 59 } 60 61 62 65 69 protected void setUp() throws Exception 70 { 71 super.setUp(); 72 73 } 75 76 77 80 81 82 83 84 87 88 89 92 93 public static class MyAbstractWriterServer extends AbstractWriterServer 94 { 95 protected void writeTestData( TestData td, Writer w ) 96 throws IOException 97 { 98 assertNotNull( 99 "writer is null.", 100 w ); 101 } 103 protected Writer openOutput( TestData td ) 104 throws IOException 105 { 106 if (td == null) 107 { 108 throw new NullPointerException ("testData is null"); 109 } 110 return new StringWriter(); 111 } 112 113 } 114 115 116 public static TestSuite suite() 117 { 118 InterfaceTestSuite suite = AbstractWriterServerUTestI.suite(); 119 suite.addFactory( new CxFactory( "A" ) { 120 public Object createImplObject() { 121 return new MyAbstractWriterServer(); 122 } 123 } ); 124 125 return suite; 126 } 127 128 public static void main( String [] args ) 129 { 130 String [] name = { THIS_CLASS.getName() }; 131 132 135 junit.textui.TestRunner.main( name ); 136 } 137 138 139 143 protected void tearDown() throws Exception 144 { 145 147 super.tearDown(); 148 } 149 } 150 151 | Popular Tags |