001: /*
002: * @(#)AutoDocITUTestI.java
003: *
004: * Copyright (C) 2002-2003 Matt Albrecht
005: * groboclown@users.sourceforge.net
006: * http://groboutils.sourceforge.net
007: *
008: * Permission is hereby granted, free of charge, to any person obtaining a
009: * copy of this software and associated documentation files (the "Software"),
010: * to deal in the Software without restriction, including without limitation
011: * the rights to use, copy, modify, merge, publish, distribute, sublicense,
012: * and/or sell copies of the Software, and to permit persons to whom the
013: * Software is furnished to do so, subject to the following conditions:
014: *
015: * The above copyright notice and this permission notice shall be included in
016: * all copies or substantial portions of the Software.
017: *
018: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
019: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
020: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
021: * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
022: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
023: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
024: * DEALINGS IN THE SOFTWARE.
025: */
026:
027: package net.sourceforge.groboutils.autodoc.v1;
028:
029: //import net.sourceforge.groboutils.testing.junitlog.v1.*;
030: import org.easymock.EasyMock;
031: import org.easymock.MockControl;
032: import net.sourceforge.groboutils.junit.v1.iftc.*;
033: import junit.framework.Test;
034: import junit.framework.TestCase;
035: import junit.framework.TestSuite;
036:
037: /**
038: * Tests the AutoDocIT interface.
039: *
040: * @author Matt Albrecht <a href="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a>
041: * @since March 27, 2002
042: * @version $Date: 2003/02/10 22:52:14 $
043: */
044: public class AutoDocITUTestI extends InterfaceTestCase {
045: //-------------------------------------------------------------------------
046: // Standard JUnit Class-specific declarations
047:
048: private static final Class THIS_CLASS = AutoDocITUTestI.class;
049:
050: // private static final IJUnitDocumentor LOG = (new JUnitLog(THIS_CLASS)).getDocumentor();
051:
052: public AutoDocITUTestI(String name, ImplFactory f) {
053: super (name, AutoDocIT.class, f);
054: }
055:
056: public AutoDocIT createAutoDocIT() {
057: return (AutoDocIT) createImplObject();
058: }
059:
060: //-------------------------------------------------------------------------
061: // Tests
062:
063: public void testTestsIssueSL1() {
064: AutoDocIT it = createAutoDocIT();
065: it.testsIssue(null, 0L);
066: }
067:
068: public void testTestsIssueSL2() {
069: AutoDocIT it = createAutoDocIT();
070: it.testsIssue("", -1L);
071: }
072:
073: public void testTestsIssueSL3() {
074: AutoDocIT it = createAutoDocIT();
075: it.testsIssue("blah", 1000L);
076: }
077:
078: public void testTestsIssueSL4() {
079: AutoDocIT it = createAutoDocIT();
080: it.testsIssue("blah", Long.MIN_VALUE);
081: }
082:
083: public void testTestsIssueSL5() {
084: AutoDocIT it = createAutoDocIT();
085: it.testsIssue("blah", Long.MAX_VALUE);
086: }
087:
088: public void testTestsIssueSS1() {
089: AutoDocIT it = createAutoDocIT();
090: it.testsIssue(null, null);
091: }
092:
093: public void testTestsIssueSS2() {
094: AutoDocIT it = createAutoDocIT();
095: it.testsIssue("a", null);
096: }
097:
098: public void testTestsIssueSS3() {
099: AutoDocIT it = createAutoDocIT();
100: it.testsIssue(null, "a");
101: }
102:
103: public void testTestsIssueSS4() {
104: AutoDocIT it = createAutoDocIT();
105: it.testsIssue("", "");
106: }
107:
108: public void testTestsIssueSS5() {
109: AutoDocIT it = createAutoDocIT();
110: it.testsIssue("blah", "asdf");
111: }
112:
113: public void testTestsIssueL1() {
114: AutoDocIT it = createAutoDocIT();
115: it.testsIssue(-1L);
116: }
117:
118: public void testTestsIssueL2() {
119: AutoDocIT it = createAutoDocIT();
120: it.testsIssue(0L);
121: }
122:
123: public void testTestsIssueL3() {
124: AutoDocIT it = createAutoDocIT();
125: it.testsIssue(Long.MAX_VALUE);
126: }
127:
128: public void testTestsIssueL4() {
129: AutoDocIT it = createAutoDocIT();
130: it.testsIssue(Long.MIN_VALUE);
131: }
132:
133: public void testTestsIssueL5() {
134: AutoDocIT it = createAutoDocIT();
135: it.testsIssue(10000L);
136: }
137:
138: public void testTestsIssueS1() {
139: AutoDocIT it = createAutoDocIT();
140: it.testsIssue(null);
141: }
142:
143: public void testTestsIssueS2() {
144: AutoDocIT it = createAutoDocIT();
145: it.testsIssue("");
146: }
147:
148: public void testTestsIssueS3() {
149: AutoDocIT it = createAutoDocIT();
150: it.testsIssue(" ");
151: }
152:
153: public void testTestsIssueS4() {
154: AutoDocIT it = createAutoDocIT();
155: it.testsIssue("asdf");
156: }
157:
158: public void testMultiTests() {
159: AutoDocIT it = createAutoDocIT();
160: it.testsIssue("asdf");
161: it.testsIssue(null);
162: it.testsIssue("blah", "asdf");
163: it.testsIssue(-1L);
164: it.testsIssue("blah", 1000L);
165: it.testsIssue("asdf");
166: }
167:
168: //-------------------------------------------------------------------------
169: // Standard JUnit declarations
170:
171: public static InterfaceTestSuite suite() {
172: InterfaceTestSuite suite = new InterfaceTestSuite(THIS_CLASS);
173:
174: return suite;
175: }
176:
177: public static void main(String[] args) {
178: String[] name = { THIS_CLASS.getName() };
179:
180: // junit.textui.TestRunner.main( name );
181: // junit.swingui.TestRunner.main( name );
182:
183: junit.textui.TestRunner.main(name);
184: }
185:
186: /**
187: *
188: * @exception Exception thrown under any exceptional condition.
189: */
190: protected void setUp() throws Exception {
191: super .setUp();
192:
193: // set ourself up
194: }
195:
196: /**
197: *
198: * @exception Exception thrown under any exceptional condition.
199: */
200: protected void tearDown() throws Exception {
201: // tear ourself down
202:
203: super.tearDown();
204: }
205: }
|