001: /*
002: * @(#)IChannelLogRecordUTestI.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 IChannelLogRecord 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 IChannelLogRecordUTestI extends InterfaceTestCase {
038: //-------------------------------------------------------------------------
039: // Standard JUnit Class-specific declarations
040:
041: private static final Class THIS_CLASS = IChannelLogRecordUTestI.class;
042: private static final AutoDoc DOC = new AutoDoc(THIS_CLASS);
043:
044: public IChannelLogRecordUTestI(String name, ImplFactory f) {
045: super (name, IChannelLogRecord.class, f);
046: }
047:
048: public IChannelLogRecord createIChannelLogRecord() {
049: return (IChannelLogRecord) createImplObject();
050: }
051:
052: //-------------------------------------------------------------------------
053: // Tests
054:
055: public void testGetClassSignature1() {
056: IChannelLogRecord clr = createIChannelLogRecord();
057: String s = clr.getClassSignature();
058: assertNotNull("Null class signature.", s);
059: assertTrue("Empty class signature.", s.length() > 0);
060: }
061:
062: public void testGetMethodIndex1() {
063: IChannelLogRecord clr = createIChannelLogRecord();
064: short s = clr.getMethodIndex();
065: assertTrue("Method index is invalid.", s >= 0);
066: }
067:
068: public void testGetMarkIndex1() {
069: IChannelLogRecord clr = createIChannelLogRecord();
070: short s = clr.getMarkIndex();
071:
072: // nothing really to assert with this.
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: }
|