KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)IChannelLogRecordUTestI.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 IChannelLogRecord 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 IChannelLogRecordUTestI extends InterfaceTestCase
39 {
40     //-------------------------------------------------------------------------
41
// Standard JUnit Class-specific declarations
42

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

61     
62     public void testGetClassSignature1()
63     {
64         IChannelLogRecord clr = createIChannelLogRecord();
65         String JavaDoc s = clr.getClassSignature();
66         assertNotNull(
67             "Null class signature.",
68             s );
69         assertTrue(
70             "Empty class signature.",
71             s.length() > 0 );
72     }
73     
74     
75     public void testGetMethodIndex1()
76     {
77         IChannelLogRecord clr = createIChannelLogRecord();
78         short s = clr.getMethodIndex();
79         assertTrue(
80             "Method index is invalid.",
81             s >= 0 );
82     }
83     
84     
85     public void testGetMarkIndex1()
86     {
87         IChannelLogRecord clr = createIChannelLogRecord();
88         short s = clr.getMarkIndex();
89         
90         // nothing really to assert with this.
91
}
92     
93     
94     
95     //-------------------------------------------------------------------------
96
// Standard JUnit declarations
97

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

113         junit.textui.TestRunner.main( name );
114     }
115     
116     
117     /**
118      *
119      * @exception Exception thrown under any exceptional condition.
120      */

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

133     protected void tearDown() throws Exception JavaDoc
134     {
135         // tear ourself down
136

137         
138         super.tearDown();
139     }
140 }
141
142
Popular Tags