KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > groboutils > codecoverage > v2 > IChannelLoggerUTestI


1 /*
2  * @(#)IChannelLoggerUTestI.java
3  *
4  * Copyright (C) 2002-2003 Matt Albrecht
5  * groboclown@users.sourceforge.net
6  * http://groboutils.sourceforge.net
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */

22
23 package net.sourceforge.groboutils.codecoverage.v2;
24
25 import net.sourceforge.groboutils.autodoc.v1.AutoDoc;
26 import net.sourceforge.groboutils.junit.v1.iftc.ImplFactory;
27 import net.sourceforge.groboutils.junit.v1.iftc.InterfaceTestCase;
28 import net.sourceforge.groboutils.junit.v1.iftc.InterfaceTestSuite;
29
30
31 /**
32  * Tests the IChannelLogger interface.
33  *
34  * @author Matt Albrecht <a HREF="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a>
35  * @version $Date: 2004/04/15 05:48:27 $
36  * @since December 28, 2002
37  */

38 public class IChannelLoggerUTestI extends InterfaceTestCase
39 {
40     //-------------------------------------------------------------------------
41
// Standard JUnit Class-specific declarations
42

43     private static final Class JavaDoc THIS_CLASS = IChannelLoggerUTestI.class;
44     private static final AutoDoc DOC = new AutoDoc( THIS_CLASS );
45     
46     public IChannelLoggerUTestI( String JavaDoc name, ImplFactory f )
47     {
48         super( name, IChannelLogger.class, f );
49     }
50
51     
52     public IChannelLogger createIChannelLogger()
53     {
54         return (IChannelLogger)createImplObject();
55     }
56
57
58     //-------------------------------------------------------------------------
59
// Tests
60

61     
62     public void testCover1()
63     {
64         IChannelLogger cl = createIChannelLogger();
65         cl.cover( null, (short)0, (short)0 );
66     }
67     
68     
69     public void testCover2()
70     {
71         IChannelLogger cl = createIChannelLogger();
72         cl.cover( "", (short)0, (short)0 );
73     }
74     
75     
76     public void testCover3()
77     {
78         IChannelLogger cl = createIChannelLogger();
79         cl.cover( "a", Short.MIN_VALUE, Short.MIN_VALUE );
80     }
81     
82     
83     public void testCover4()
84     {
85         IChannelLogger cl = createIChannelLogger();
86         cl.cover( "a", Short.MAX_VALUE, Short.MAX_VALUE );
87     }
88     
89     
90     
91     //-------------------------------------------------------------------------
92
// Standard JUnit declarations
93

94     
95     public static InterfaceTestSuite suite()
96     {
97         InterfaceTestSuite suite = new InterfaceTestSuite( THIS_CLASS );
98         
99         return suite;
100     }
101     
102     public static void main( String JavaDoc[] args )
103     {
104         String JavaDoc[] name = { THIS_CLASS.getName() };
105         
106         // junit.textui.TestRunner.main( name );
107
// junit.swingui.TestRunner.main( name );
108

109         junit.textui.TestRunner.main( name );
110     }
111     
112     
113     /**
114      *
115      * @exception Exception thrown under any exceptional condition.
116      */

117     protected void setUp() throws Exception JavaDoc
118     {
119         super.setUp();
120         
121         // set ourself up
122
}
123     
124     
125     /**
126      *
127      * @exception Exception thrown under any exceptional condition.
128      */

129     protected void tearDown() throws Exception JavaDoc
130     {
131         // tear ourself down
132

133         
134         super.tearDown();
135     }
136 }
137
138
Popular Tags