1 26 27 package net.sourceforge.groboutils.autodoc.v1.junit; 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.*; 35 import net.sourceforge.groboutils.junit.v1.iftc.*; 36 import junit.framework.AssertionFailedError; 37 import junit.framework.TestListener; 38 import net.sourceforge.groboutils.autodoc.v1.spi.*; 39 40 41 48 public class AutoDocJUnitListenerJDK13UTest extends TestCase 49 { 50 53 private static final Class THIS_CLASS = AutoDocJUnitListenerJDK13UTest.class; 54 private static final AutoDoc AD = new AutoDoc(THIS_CLASS); 55 56 public AutoDocJUnitListenerJDK13UTest( String name ) 57 { 58 super( name ); 59 } 60 61 62 65 private MockControl testControl; 66 private Test mockTest; 67 68 69 73 protected void setUp() throws Exception 74 { 75 super.setUp(); 76 77 this.testControl = EasyMock.controlFor( Test.class ); 79 this.mockTest = (Test)this.testControl.getMock(); 80 } 81 82 83 86 public void testConstructor1() 87 { 88 new AutoDocJUnitListener(); 89 } 90 91 92 public void testConstructor1a() 93 { 94 new AutoDocJUnitListener( null ); 95 } 96 97 98 public void testConstructor1b() 99 { 100 new AutoDocJUnitListener( new TestListenerFactory[0] ); 101 } 102 103 104 public void testConstructor2() 105 { 106 TestListenerFactory fl[] = new TestListenerFactory[] { 107 new TestListenerFactory() { 108 public TestListener createListener() 109 { 110 return null; 111 } 112 } 113 }; 114 new AutoDocJUnitListener( fl ); 115 } 116 117 118 public void testConstructor3() 119 { 120 new AutoDocJUnitListener( null ); 121 } 122 123 124 127 128 129 132 133 public static Test suite() 134 { 135 InterfaceTestSuite suite = AutoDocJUnitListenerUTestI.suite(); 136 suite.addTestSuite( THIS_CLASS ); 137 suite.addFactory( new CxFactory( "A" ) { 138 public Object createImplObject() { 139 return new AutoDocJUnitListener(); 140 } 141 } ); 142 143 return suite; 144 } 145 146 public static void main( String [] args ) 147 { 148 String [] name = { THIS_CLASS.getName() }; 149 150 153 junit.textui.TestRunner.main( name ); 154 } 155 156 157 161 protected void tearDown() throws Exception 162 { 163 165 166 super.tearDown(); 167 } 168 } 169 170 | Popular Tags |