001: /*
002: * @(#)IChannelLogReaderUTestI.java
003: *
004: * Copyright (C) 2002-2003 Matt Albrecht
005: * groboclown@users.sourceforge.net
006: * http://groboutils.sourceforge.net
007: *
008: * This program is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU Lesser General Public License
010: * as published by the Free Software Foundation; either version 2
011: * of the License, or (at your option) any later version.
012: *
013: * This program is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016: * GNU Lesser General Public License for more details.
017: *
018: * You should have received a copy of the GNU Lesser General Public License
019: * along with this program; if not, write to the Free Software
020: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
021: */
022:
023: package net.sourceforge.groboutils.codecoverage.v2;
024:
025: import net.sourceforge.groboutils.autodoc.v1.AutoDoc;
026: import net.sourceforge.groboutils.junit.v1.iftc.ImplFactory;
027: import net.sourceforge.groboutils.junit.v1.iftc.InterfaceTestCase;
028: import net.sourceforge.groboutils.junit.v1.iftc.InterfaceTestSuite;
029:
030: /**
031: * Tests the IChannelLogReader interface.
032: *
033: * @author Matt Albrecht <a href="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a>
034: * @version $Date: 2004/04/15 05:48:27 $
035: * @since December 28, 2002
036: */
037: public class IChannelLogReaderUTestI extends InterfaceTestCase {
038: //-------------------------------------------------------------------------
039: // Standard JUnit Class-specific declarations
040:
041: private static final Class THIS_CLASS = IChannelLogReaderUTestI.class;
042: private static final AutoDoc DOC = new AutoDoc(THIS_CLASS);
043:
044: public IChannelLogReaderUTestI(String name, ImplFactory f) {
045: super (name, IChannelLogReader.class, f);
046: }
047:
048: public IChannelLogReader createIChannelLogReader() {
049: return (IChannelLogReader) createImplObject();
050: }
051:
052: //-------------------------------------------------------------------------
053: // Tests
054:
055: public void testGetReaderForClassSignature1() throws Exception {
056: IChannelLogReader clr = createIChannelLogReader();
057: IClassChannelLogReader cclr = clr
058: .getReaderForClassSignature(null);
059: assertNotNull("Returned null reader.", cclr);
060: assertNull("Did not return null next.", cclr.nextRecord());
061: }
062:
063: public void testGetReaderForClassSignature2() throws Exception {
064: IChannelLogReader clr = createIChannelLogReader();
065: IClassChannelLogReader cclr = clr
066: .getReaderForClassSignature("");
067: assertNotNull("Returned null reader.", cclr);
068: assertNull("Did not return null next.", cclr.nextRecord());
069: }
070:
071: //-------------------------------------------------------------------------
072: // Standard JUnit declarations
073:
074: public static InterfaceTestSuite suite() {
075: InterfaceTestSuite suite = new InterfaceTestSuite(THIS_CLASS);
076:
077: return suite;
078: }
079:
080: public static void main(String[] args) {
081: String[] name = { THIS_CLASS.getName() };
082:
083: // junit.textui.TestRunner.main( name );
084: // junit.swingui.TestRunner.main( name );
085:
086: junit.textui.TestRunner.main(name);
087: }
088:
089: /**
090: *
091: * @exception Exception thrown under any exceptional condition.
092: */
093: protected void setUp() throws Exception {
094: super .setUp();
095:
096: // set ourself up
097: }
098:
099: /**
100: *
101: * @exception Exception thrown under any exceptional condition.
102: */
103: protected void tearDown() throws Exception {
104: // tear ourself down
105:
106: super.tearDown();
107: }
108: }
|