1 22 23 package net.sourceforge.groboutils.codecoverage.v2; 24 25 import java.util.Properties ; 26 27 import net.sourceforge.groboutils.autodoc.v1.AutoDoc; 28 import net.sourceforge.groboutils.junit.v1.AssertConstructor; 29 import net.sourceforge.groboutils.junit.v1.iftc.ImplFactory; 30 import net.sourceforge.groboutils.junit.v1.iftc.InterfaceTestCase; 31 import net.sourceforge.groboutils.junit.v1.iftc.InterfaceTestSuite; 32 33 34 41 public class IChannelLoggerFactoryUTestI extends InterfaceTestCase 42 { 43 46 private static final Class THIS_CLASS = IChannelLoggerFactoryUTestI.class; 47 private static final AutoDoc DOC = new AutoDoc( THIS_CLASS ); 48 49 public IChannelLoggerFactoryUTestI( String name, ImplFactory f ) 50 { 51 super( name, IChannelLoggerFactory.class, f ); 52 } 53 54 55 public IChannelLoggerFactory createIChannelLoggerFactory() 56 { 57 return (IChannelLoggerFactory)createImplObject(); 58 } 59 60 61 64 65 public void testConstructor1() 67 { 68 IChannelLoggerFactory clf = createIChannelLoggerFactory(); 69 AssertConstructor.assertHasDefaultConstructor( 70 "All instances of IChannelLoggerFactory must have a default "+ 71 "constructor.", clf ); 72 } 73 74 75 public void testCreateChannelLogger1() 76 { 77 IChannelLoggerFactory clf = createIChannelLoggerFactory(); 78 IChannelLogger cl = clf.createChannelLogger( 79 "", new Properties (), (short)0 ); 80 assertNotNull( 81 "Returned null logger.", 82 cl ); 83 } 84 85 86 public void testCreateChannelLogger2() 87 { 88 IChannelLoggerFactory clf = createIChannelLoggerFactory(); 89 IChannelLogger cl = clf.createChannelLogger( 90 "", new Properties (), Short.MIN_VALUE ); 91 assertNotNull( 92 "Returned null logger.", 93 cl ); 94 } 95 96 97 public void testCreateChannelLogger3() 98 { 99 IChannelLoggerFactory clf = createIChannelLoggerFactory(); 100 IChannelLogger cl = clf.createChannelLogger( 101 "", new Properties (), Short.MAX_VALUE ); 102 assertNotNull( 103 "Returned null logger.", 104 cl ); 105 } 106 107 108 111 112 public static InterfaceTestSuite suite() 113 { 114 InterfaceTestSuite suite = new InterfaceTestSuite( THIS_CLASS ); 115 116 return suite; 117 } 118 119 public static void main( String [] args ) 120 { 121 String [] name = { THIS_CLASS.getName() }; 122 123 126 junit.textui.TestRunner.main( name ); 127 } 128 129 130 134 protected void setUp() throws Exception 135 { 136 super.setUp(); 137 138 } 140 141 142 146 protected void tearDown() throws Exception 147 { 148 150 151 super.tearDown(); 152 } 153 } 154 155 | Popular Tags |