You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2003/01/01 14:13:21 UTC
cvs commit: jakarta-cactus/sample-servlet/src/unit/j2ee13/org/apache/cactus/unit TestAll.java
vmassol 2003/01/01 05:13:21
Modified: sample-servlet/src/unit/j2ee13/org/apache/cactus/unit
TestAll.java
Added: sample-servlet/src/unit/share/org/apache/cactus/unit
TestServletTestCaseHttpUnit.java
Removed: sample-servlet/src/unit/share/org/apache/cactus/unit
TestServletTestCase_HttpUnit.java
Log:
Renamed to be compliant with our naming conventions
Revision Changes Path
1.1 jakarta-cactus/sample-servlet/src/unit/share/org/apache/cactus/unit/TestServletTestCaseHttpUnit.java
Index: TestServletTestCaseHttpUnit.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Cactus", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.cactus.unit;
import java.io.IOException;
import java.io.PrintWriter;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.cactus.ServletTestCase;
/**
* Some tests that verify Cactus HtppUnit integration.
*
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
*
* @version $Id: TestServletTestCaseHttpUnit.java,v 1.1 2003/01/01 13:13:21 vmassol Exp $
*/
public class TestServletTestCaseHttpUnit extends ServletTestCase
{
/**
* Defines the testcase name for JUnit.
*
* @param theName the testcase's name.
*/
public TestServletTestCaseHttpUnit(String theName)
{
super(theName);
}
/**
* Start the tests.
*
* @param theArgs the arguments. Not used
*/
public static void main(String[] theArgs)
{
junit.swingui.TestRunner.main(
new String[] { TestServletTestCaseHttpUnit.class.getName() });
}
/**
* @return a test suite (<code>TestSuite</code>) that includes all methods
* starting with "test"
*/
public static Test suite()
{
// All methods starting with "test" will be executed in the test suite.
return new TestSuite(TestServletTestCaseHttpUnit.class);
}
//-------------------------------------------------------------------------
/**
* Verify that the HttpUnit integration works.
*
* @exception IOException on test failure
*/
public void testHttpUnitGetText() throws IOException
{
PrintWriter pw = response.getWriter();
pw.print("something to return for the test");
}
/**
* Verify that HttpUnit integration works
*
* @param theResponse the response from the server side.
*
* @exception IOException on test failure
*/
public void endHttpUnitGetText(
com.meterware.httpunit.WebResponse theResponse) throws IOException
{
String text = theResponse.getText();
assertEquals("something to return for the test", text);
}
}
1.8 +2 -2 jakarta-cactus/sample-servlet/src/unit/j2ee13/org/apache/cactus/unit/TestAll.java
Index: TestAll.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/sample-servlet/src/unit/j2ee13/org/apache/cactus/unit/TestAll.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TestAll.java 24 Nov 2002 21:44:55 -0000 1.7
+++ TestAll.java 1 Jan 2003 13:13:21 -0000 1.8
@@ -116,7 +116,7 @@
suite.addTest(
org.apache.cactus.unit.TestServletTestCaseAuthentication.suite());
suite.addTest(
- org.apache.cactus.unit.TestServletTestCase_HttpUnit.suite());
+ org.apache.cactus.unit.TestServletTestCaseHttpUnit.suite());
// Test cases specific to J2EE 1.3 only
suite.addTest(
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>