KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

61     
62     public void testGetReaderForClassSignature1() throws Exception JavaDoc
63     {
64         IChannelLogReader clr = createIChannelLogReader();
65         IClassChannelLogReader cclr = clr.getReaderForClassSignature( null );
66         assertNotNull(
67             "Returned null reader.",
68             cclr );
69         assertNull(
70             "Did not return null next.",
71             cclr.nextRecord() );
72     }
73     
74     
75     public void testGetReaderForClassSignature2() throws Exception JavaDoc
76     {
77         IChannelLogReader clr = createIChannelLogReader();
78         IClassChannelLogReader cclr = clr.getReaderForClassSignature( "" );
79         assertNotNull(
80             "Returned null reader.",
81             cclr );
82         assertNull(
83             "Did not return null next.",
84             cclr.nextRecord() );
85     }
86     
87     
88     
89     //-------------------------------------------------------------------------
90
// Standard JUnit declarations
91

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

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

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

127     protected void tearDown() throws Exception JavaDoc
128     {
129         // tear ourself down
130

131         
132         super.tearDown();
133     }
134 }
135
136
Popular Tags