001: /*
002: * @(#)IChannelLoggerUTestI.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 IChannelLogger 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 IChannelLoggerUTestI extends InterfaceTestCase {
038: //-------------------------------------------------------------------------
039: // Standard JUnit Class-specific declarations
040:
041: private static final Class THIS_CLASS = IChannelLoggerUTestI.class;
042: private static final AutoDoc DOC = new AutoDoc(THIS_CLASS);
043:
044: public IChannelLoggerUTestI(String name, ImplFactory f) {
045: super (name, IChannelLogger.class, f);
046: }
047:
048: public IChannelLogger createIChannelLogger() {
049: return (IChannelLogger) createImplObject();
050: }
051:
052: //-------------------------------------------------------------------------
053: // Tests
054:
055: public void testCover1() {
056: IChannelLogger cl = createIChannelLogger();
057: cl.cover(null, (short) 0, (short) 0);
058: }
059:
060: public void testCover2() {
061: IChannelLogger cl = createIChannelLogger();
062: cl.cover("", (short) 0, (short) 0);
063: }
064:
065: public void testCover3() {
066: IChannelLogger cl = createIChannelLogger();
067: cl.cover("a", Short.MIN_VALUE, Short.MIN_VALUE);
068: }
069:
070: public void testCover4() {
071: IChannelLogger cl = createIChannelLogger();
072: cl.cover("a", Short.MAX_VALUE, Short.MAX_VALUE);
073: }
074:
075: //-------------------------------------------------------------------------
076: // Standard JUnit declarations
077:
078: public static InterfaceTestSuite suite() {
079: InterfaceTestSuite suite = new InterfaceTestSuite(THIS_CLASS);
080:
081: return suite;
082: }
083:
084: public static void main(String[] args) {
085: String[] name = { THIS_CLASS.getName() };
086:
087: // junit.textui.TestRunner.main( name );
088: // junit.swingui.TestRunner.main( name );
089:
090: junit.textui.TestRunner.main(name);
091: }
092:
093: /**
094: *
095: * @exception Exception thrown under any exceptional condition.
096: */
097: protected void setUp() throws Exception {
098: super .setUp();
099:
100: // set ourself up
101: }
102:
103: /**
104: *
105: * @exception Exception thrown under any exceptional condition.
106: */
107: protected void tearDown() throws Exception {
108: // tear ourself down
109:
110: super.tearDown();
111: }
112: }
|