From cactus-dev-karawilliams@example.com Mon Dec 01 09:00:22 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 58150 invoked from network); 1 Dec 2003 09:00:22 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Dec 2003 09:00:22 -0000 Received: (qmail 93596 invoked by uid 500); 1 Dec 2003 08:59:57 -0000 Delivered-To: karawilliams@example.com Received: (qmail 93576 invoked by uid 500); 1 Dec 2003 08:59:57 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 93563 invoked from network); 1 Dec 2003 08:59:57 -0000 Received: from unknown (HELO smtp-ft6.fr.colt.net) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Dec 2003 08:59:57 -0000 Received: from vma (host.83.161.120.155.rev.coltfrance.com [83.161.120.155]) by smtp-ft6.fr.colt.net with ESMTP id hB1908413271 for <karawilliams@example.com>; Mon, 1 Dec 2003 10:00:08 +0100 From: "Vincent Massol" <karawilliams@example.com> To: "'Cactus Developers List'" <karawilliams@example.com> Subject: My last commit on AbstractCactusTestCase Date: Mon, 1 Dec 2003 09:59:49 +0100 Message-ID: <016601c3b7e9$7b0a4740$2502a8c0@vma> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Please do not pay attention to my last CVS commit which introduced the AbstractCactusTestCase class. I've realized there's a better way. Here's what I'd like to for brokers/spines/testlet/etc writers: * They create a XXXTestCase class which extends TestCase * They create a runBare() method in XXXTestCase, as follows: public void runBare() throws Throwable { new CactusTestCaseHandler( new XXXProtocolHandler(), new XXXConfiguration(), pureJUnitTestToWrapOrNullIfNone).runBare(); } * XXXProtocolHandler implements ProtocolHandler IF * XXXConfiguration implements Configuration (not the one that currently exists) Note: That's all that's needed for the client side. There's more for the server side. I think it's more flexible and better than hiding stuff in an Abstract class. I'll be writing an email soon with the client-side SPI for writing new brokers/spines/testlets/etc. Thanks -Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Mon Dec 01 19:44:30 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 5271 invoked from network); 1 Dec 2003 19:44:30 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Dec 2003 19:44:30 -0000 Received: (qmail 18396 invoked by uid 500); 1 Dec 2003 19:44:05 -0000 Delivered-To: karawilliams@example.com Received: (qmail 18344 invoked by uid 500); 1 Dec 2003 19:44:05 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 18277 invoked from network); 1 Dec 2003 19:44:04 -0000 Received: from unknown (HELO smtp.noos.fr) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Dec 2003 19:44:04 -0000 Received: (qmail 8993 invoked by uid 0); 1 Dec 2003 19:44:05 -0000 Received: from unknown (HELO vma) ([83.161.120.155]) (envelope-sender <karawilliams@example.com>) by 83.161.120.155 (qmail-ldap-1.03) with SMTP for <karawilliams@example.com>; 1 Dec 2003 19:44:05 -0000 From: "Vincent Massol" <karawilliams@example.com> To: "'Cactus Developers List'" <karawilliams@example.com> Subject: RE: My last commit on AbstractCactusTestCase Date: Mon, 1 Dec 2003 20:43:43 +0100 Message-ID: <026001c3b843$7016ae00$2502a8c0@vma> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Vincent Massol [mailto:karawilliams@example.com] > Sent: 01 December 2003 10:00 > To: 'Cactus Developers List' > Subject: My last commit on AbstractCactusTestCase > > Hi, > > Please do not pay attention to my last CVS commit which introduced the > AbstractCactusTestCase class. I've realized there's a better way. Here's > what I'd like to for brokers/spines/testlet/etc writers: > > * They create a XXXTestCase class which extends TestCase > * They create a runBare() method in XXXTestCase, as follows: > > public void runBare() throws Throwable > { > new CactusTestCaseHandler( > new XXXProtocolHandler(), > new XXXConfiguration(), > pureJUnitTestToWrapOrNullIfNone).runBare(); > } > As you have all noticed, this is not going to work... :-) For lots of reasons. Let me implement it and I'll come back with a proper solution :-) -Vincent > * XXXProtocolHandler implements ProtocolHandler IF > * XXXConfiguration implements Configuration (not the one that currently > exists) > > Note: That's all that's needed for the client side. There's more for the > server side. > > I think it's more flexible and better than hiding stuff in an Abstract > class. > > I'll be writing an email soon with the client-side SPI for writing new > brokers/spines/testlets/etc. > > Thanks > -Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Mon Dec 01 23:26:06 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 7413 invoked from network); 1 Dec 2003 23:26:06 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Dec 2003 23:26:06 -0000 Received: (qmail 69032 invoked by uid 500); 1 Dec 2003 23:25:52 -0000 Delivered-To: karawilliams@example.com Received: (qmail 69006 invoked by uid 500); 1 Dec 2003 23:25:52 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 68991 invoked from network); 1 Dec 2003 23:25:52 -0000 Received: from unknown (HELO smtp106.mail.sc5.yahoo.com) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Dec 2003 23:25:52 -0000 Received: from unknown (HELO ?83.161.120.155?) (karawilliams@example.com with login) by smtp-v1.mail.vip.sc5.yahoo.com with SMTP; 1 Dec 2003 23:25:59 -0000 User-Agent: Microsoft-Entourage/83.161.120.1558 Date: Mon, 01 Dec 2003 16:27:50 -0700 Subject: Re: My last commit on AbstractCactusTestCase From: Nicholas Lesiecki <karawilliams@example.com> To: Cactus Developers List <karawilliams@example.com> Message-ID: <karawilliams@example.com> In-Reply-To: <026001c3b843$7016ae00$2502a8c0@vma> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > As you have all noticed, this is not going to work... :-) For lots of > reasons. Let me implement it and I'll come back with a proper solution > :-) > > -Vincent :) I share Chris' concern that the framework we have may be too thin to be pluggable. However, I am all for experimenting with the framework to see if we can make it work. Perhaps we'll discover things about cactus we didn't know before. The idea of making the framework support different protocols/brokers through an SPI seems very attractive. Certainly it would encourage contribution. I look forward to the results... Nick --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Fri Dec 05 14:26:27 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 21778 invoked from network); 5 Dec 2003 14:26:27 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 5 Dec 2003 14:26:27 -0000 Received: (qmail 13862 invoked by uid 500); 5 Dec 2003 14:26:23 -0000 Delivered-To: karawilliams@example.com Received: (qmail 13795 invoked by uid 500); 5 Dec 2003 14:26:23 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 13782 invoked by uid 500); 5 Dec 2003 14:26:23 -0000 Received: (qmail 13772 invoked from network); 5 Dec 2003 14:26:22 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 5 Dec 2003 14:26:22 -0000 Received: (qmail 21754 invoked by uid 1355); 5 Dec 2003 14:26:26 -0000 Date: 5 Dec 2003 14:26:26 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework build.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N cmlenz 2003/12/05 06:26:26 Modified: framework build.xml Log: Make Log4J optional, as it's only used for logging in the tests Revision Changes Path 1.76 +4 -4 jakarta-cactus/framework/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/build.xml,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- build.xml 20 Oct 2003 21:14:720-205-7607.75 +++ build.xml 5 Dec 2003 14:26:25 -0000 1.76 @@ -75,7 +75,8 @@ <target name="init.aspectj"> <!-- Define the AspectJ tasks --> - <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"> + <taskdef + resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"> <classpath> <pathelement location="${aspectj-tools.jar}"/> </classpath> @@ -98,7 +99,7 @@ <echo> httpunit.jar = [${httpunit.jar}]</echo> <echo> j2ee.jar = [${j2ee.jar}]</echo> <echo> junit.jar = [${junit.jar}]</echo> - <echo> log4j.jar = [${log4j.jar}]</echo> + <echo> log4j.jar (optional) = [${log4j.jar}]</echo> <echo> xmlapis.jar (optional) = [${xmlapis.jar}]</echo> <echo/> <echo>Options:</echo> @@ -123,7 +124,6 @@ <available file="${httpunit.jar}"/> <available file="${j2ee.jar}"/> <available file="${junit.jar}"/> - <available file="${log4j.jar}"/> <!-- Check for a TraX class instead of the xmlapis.jar file so that the build works on JDK 1.4 without needing to define the xmlapis.jar property --> --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Fri Dec 05 14:28:16 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 22978 invoked from network); 5 Dec 2003 14:28:16 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 5 Dec 2003 14:28:16 -0000 Received: (qmail 17797 invoked by uid 500); 5 Dec 2003 14:28:12 -0000 Delivered-To: karawilliams@example.com Received: (qmail 17772 invoked by uid 500); 5 Dec 2003 14:28:12 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 17755 invoked by uid 500); 5 Dec 2003 14:28:12 -0000 Received: (qmail 17748 invoked from network); 5 Dec 2003 14:28:12 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 5 Dec 2003 14:28:12 -0000 Received: (qmail 22954 invoked by uid 1355); 5 Dec 2003 14:28:15 -0000 Date: 5 Dec 2003 14:28:15 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework project.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N cmlenz 2003/12/05 06:28:15 Modified: framework project.xml Log: Update versions of AspectJ and HttpClient to match those in build.properties.sample (Yes I've used Maven, but only for the JAR downloading part ;-) ) Revision Changes Path 1.11 +8 -10 jakarta-cactus/framework/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/project.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- project.xml 21 Sep 2003 10:14:54 -0000 1.10 +++ project.xml 5 Dec 2003 14:28:15 -0000 1.11 @@ -1,35 +1,32 @@ <?xml version="1.0"?> <project> + <extend>${basedir}/../default-project.xml</extend> + <id>jakarta-cactus-framework</id> <name>Jakarta Cactus Framework</name> <repository> <connection>scm:cvs:pserver:karawilliams@example.com:/home/cvspublic:jakarta-cactus/framework</connection> <url>http://cvs.apache.org/viewcvs/jakarta-cactus/framework</url> </repository> + <dependencies> <dependency> <groupId>aspectj</groupId> <artifactId>aspectjrt</artifactId> - <version>1.0.6</version> + <version>1.1.1</version> <url>http://www.eclipse.org/aspectj/</url> </dependency> <dependency> <groupId>aspectj</groupId> - <artifactId>aspectj-tools</artifactId> - <version>1.0.6</version> - <url>http://www.eclipse.org/aspectj/</url> - </dependency> - <dependency> - <groupId>aspectj</groupId> - <artifactId>aspectj-ant</artifactId> - <version>1.0.6</version> + <artifactId>aspectjtools</artifactId> + <version>1.1.1</version> <url>http://www.eclipse.org/aspectj/</url> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> - <version>2.0-rc1</version> + <version>2.0-rc2</version> <url>http://jakarta.apache.org/commons/httpclient/</url> </dependency> <dependency> @@ -57,6 +54,7 @@ <version>${cactus.j2ee.version.full}</version> </dependency> </dependencies> + <packageGroups> <packageGroup> <title>Public API</title> --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Fri Dec 05 14:35:18 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 27010 invoked from network); 5 Dec 2003 14:35:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 5 Dec 2003 14:35:18 -0000 Received: (qmail 31568 invoked by uid 500); 5 Dec 2003 14:35:14 -0000 Delivered-To: karawilliams@example.com Received: (qmail 31539 invoked by uid 500); 5 Dec 2003 14:35:13 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 31525 invoked by uid 500); 5 Dec 2003 14:35:13 -0000 Received: (qmail 31509 invoked from network); 5 Dec 2003 14:35:13 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 5 Dec 2003 14:35:13 -0000 Received: (qmail 26987 invoked by uid 1355); 5 Dec 2003 14:35:16 -0000 Date: 5 Dec 2003 14:35:16 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/integration/maven project.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N cmlenz 2003/12/05 06:35:16 Modified: samples/jetty build.properties.sample framework build.properties.sample . build.properties.sample integration/ant build.properties.sample integration/maven project.xml Log: Update HttpUnit default version to 1.5.4 Revision Changes Path 1.16 +2 -2 jakarta-cactus/samples/jetty/build.properties.sample Index: build.properties.sample =================================================================== RCS file: /home/cvs/jakarta-cactus/samples/jetty/build.properties.sample,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- build.properties.sample 23 Oct 2003 12:27:43 -0000 1.15 +++ build.properties.sample 5 Dec 2003 14:35:16 -0000 1.16 @@ -37,7 +37,7 @@ junit.jar = ${lib.repo}/junit/jars/junit-3.8.1.jar # The location of the Httpunit jar -httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.3.jar +httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.4.jar # ----------------------------------------------------------------------------- # Mandatory properties for the Sample Jetty project. 1.33 +2 -2 jakarta-cactus/framework/build.properties.sample Index: build.properties.sample =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/build.properties.sample,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- build.properties.sample 20 Oct 2003 21:26:22 -0000 1.32 +++ build.properties.sample 5 Dec 2003 14:35:16 -0000 1.33 @@ -37,7 +37,7 @@ commons.httpclient.jar = ${lib.repo}/commons-httpclient/jars/commons-httpclient-2.0-rc2.jar # The location of the Httpunit jar -httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.3.jar +httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.4.jar # ----------------------------------------------------------------------------- # Optional properties 1.93 +2 -2 jakarta-cactus/build.properties.sample Index: build.properties.sample =================================================================== RCS file: /home/cvs/jakarta-cactus/build.properties.sample,v retrieving revision 1.92 retrieving revision 1.93 diff -u -r1.92 -r1.93 --- build.properties.sample 23 Nov 2003 20:27:720-205-7607.92 +++ build.properties.sample 5 Dec 2003 14:35:16 -0000 1.93 @@ -62,7 +62,7 @@ standard.jar = ${lib.repo}/taglibs/jars/standard-1.0.2.jar # The location of the Httpunit jar -httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.3.jar +httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.4.jar # Neko HTML (required by HttpUnit) nekohtml.jar = ${lib.repo}/nekohtml/jars/nekohtml-0.7.4.jar 1.21 +2 -2 jakarta-cactus/integration/ant/build.properties.sample Index: build.properties.sample =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/ant/build.properties.sample,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- build.properties.sample 25 Oct 2003 18:42:28 -0000 1.20 +++ build.properties.sample 5 Dec 2003 14:35:16 -0000 1.21 @@ -46,7 +46,7 @@ mockobjects.jar = ${lib.repo}/mockobjects/jars/mockobjects-core-0.09.jar # The location of the Httpunit jar -httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.3.jar +httpunit.jar = ${lib.repo}/httpunit/jars/httpunit-1.5.4.jar # Neko HTML (required by HttpUnit) nekohtml.jar = ${lib.repo}/nekohtml/jars/nekohtml-0.7.4.jar 1.6 +1 -1 jakarta-cactus/integration/maven/project.xml Index: project.xml =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/maven/project.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- project.xml 16 Nov 2003 13:34:09 -0000 1.5 +++ project.xml 5 Dec 2003 14:35:16 -0000 1.6 @@ -57,7 +57,7 @@ <dependency> <groupId>httpunit</groupId> <artifactId>httpunit</artifactId> - <version>1.5.3</version> + <version>1.5.4</version> </dependency> <dependency> <groupId>nekohtml</groupId> --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 10:38:42 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 87066 invoked from network); 6 Dec 2003 10:38:42 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 10:38:42 -0000 Received: (qmail 43233 invoked by uid 500); 6 Dec 2003 10:38:16 -0000 Delivered-To: karawilliams@example.com Received: (qmail 43211 invoked by uid 500); 6 Dec 2003 10:38:16 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 43198 invoked by uid 500); 6 Dec 2003 10:38:16 -0000 Received: (qmail 43195 invoked from network); 6 Dec 2003 10:38:15 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 10:38:15 -0000 Received: (qmail 87058 invoked by uid 1262); 6 Dec 2003 10:38:41 -0000 Date: 6 Dec 2003 10:38:41 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/documentation/docs/xdocs changes.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 02:38:41 Modified: framework/src/java/share/org/apache/cactus/configuration BaseConfiguration.java documentation/docs/xdocs changes.xml Log: Tried to remove dependency on commons-httpclient in server-side code. Thanks to Kazuhito SUGURI [karawilliams@example.com] Revision Changes Path 1.7 +9 -5 jakarta-cactus/framework/src/java/share/org/apache/cactus/configuration/BaseConfiguration.java Index: BaseConfiguration.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/configuration/BaseConfiguration.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- BaseConfiguration.java 19 Oct 2003 18:06:47 -0000 1.6 +++ BaseConfiguration.java 6 Dec 2003 10:38:41 -0000 1.7 @@ -56,7 +56,6 @@ */ package org.apache.cactus.configuration; -import org.apache.cactus.client.connector.http.HttpClientConnectionHelper; import org.apache.cactus.util.ChainedRuntimeException; /** @@ -87,11 +86,16 @@ "cactus.connectionHelper.classname"; /** - * Default {@link org.apache.cactus.client.connector.http.ConnectionHelper} - * to use. + * Default HTTP connection class to use. + * + * Note: We are using a string to point to the class to use. The reason is + * that this class is only needed on the client side. Using an explicit + * <code>HttpClientConnectionHelper.class.getName()</code> would require + * the implementation library (e.g commons-httpclient) to be also present + * on the server side classpath. */ public static final String DEFAULT_CACTUS_CONNECTION_HELPER_CLASSNAME = - HttpClientConnectionHelper.class.getName(); + "org.apache.cactus.client.connector.http.HttpClientConnectionHelper"; /** * Name of the Cactus property for defining an initializer (i.e. a class 1.146 +4 -0 jakarta-cactus/documentation/docs/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/jakarta-cactus/documentation/docs/xdocs/changes.xml,v retrieving revision 1.145 retrieving revision 1.146 diff -u -r1.145 -r1.146 --- changes.xml 23 Nov 2003 21:31:34 -0000 1.145 +++ changes.xml 6 Dec 2003 10:38:41 -0000 1.146 @@ -68,6 +68,10 @@ </devs> <release version="1.6dev" date="in CVS"> + <action dev="VMA" type="fix" due-to="Kazuhito SUGURI" due-to-email="karawilliams@example.com"> + Prevent requiring <code>commons-httpclient</code> jar to be present + on the server-side classpath. + </action> <action dev="VMA" type="add"> Added the Maven plugin. It was formerly hosted in the Maven project's own CVS. It is now in the Cactus CVS and is part of the Cactus --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 10:41:31 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 87716 invoked from network); 6 Dec 2003 10:41:31 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 10:41:31 -0000 Received: (qmail 45000 invoked by uid 500); 6 Dec 2003 10:41:05 -0000 Delivered-To: karawilliams@example.com Received: (qmail 44913 invoked by uid 500); 6 Dec 2003 10:41:05 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 44900 invoked by uid 500); 6 Dec 2003 10:41:04 -0000 Received: (qmail 44897 invoked from network); 6 Dec 2003 10:41:04 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 10:41:04 -0000 Received: (qmail 87699 invoked by uid 1262); 6 Dec 2003 10:41:30 -0000 Date: 6 Dec 2003 10:41:30 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework/src/java/share/org/apache/cactus/server AbstractWebTestCaller.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 02:41:30 Modified: framework/src/java/share/org/apache/cactus AbstractCactusTestCase.java ServletTestCase.java framework/src/java/j2ee13/org/apache/cactus FilterTestCase.java framework/src/java/share/org/apache/cactus/server AbstractWebTestCaller.java Added: framework/src/java/share/org/apache/cactus CactusTestCase.java Log: - Added new Cactus TestCase SPI: runBareServer(). Executed on the server side to start the test. - Removed the need for a isServerSide() method in Cactus TestCase. WebTestCallers now use the new runBarServer() instead Revision Changes Path 1.2 +50 -60 jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractCactusTestCase.java Index: AbstractCactusTestCase.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractCactusTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractCactusTestCase.java 30 Nov 2003 20:37:07 -0000 1.1 +++ AbstractCactusTestCase.java 6 Dec 2003 10:41:30 -0000 1.2 @@ -99,6 +99,32 @@ */ private ServerTestCaseDelegate serverDelegate; + // ---------------------------------------------------------------------- + + /** + * Create a client side test case delegate. + * + * @param theTest the JUnit test to wrap or null if there is no test to + * wrap + * @return the client side test case delegate to use + */ + protected abstract ClientTestCaseDelegate createClientTestCaseDelegate( + Test theTest); + + // ---------------------------------------------------------------------- + + /** + * Create a server side test case delegate. + * + * @param theTest the JUnit test to wrap or null if there is no test to + * wrap + * @return the server side test case delegate to use + */ + protected ServerTestCaseDelegate createServerTestCaseDelegate(Test theTest) + { + return new ServerTestCaseDelegate(this, theTest); + } + /** * Default constructor defined in order to allow creating Test Case * without needing to define constructor (new feature in JUnit 3.8.1). @@ -131,26 +157,8 @@ super(theName); init(theTest); } - - /** - * Create a client side test case delegate. - * - * @param theTest the JUnit test to wrap or null if there is no test to - * wrap - * @return the client side test case delegate to use - */ - protected abstract ClientTestCaseDelegate createClientTestCaseDelegate( - Test theTest); - - /** - * Create a server side test case delegate. - * - * @param theTest the JUnit test to wrap or null if there is no test to - * wrap - * @return the server side test case delegate to use - */ - protected abstract ServerTestCaseDelegate createServerTestCaseDelegate( - Test theTest); + + // ---------------------------------------------------------------------- /** * @param theDelegate the client test case delegate @@ -196,73 +204,55 @@ } /** - * @return true if this test class has been instanciated on the server - * side or false otherwise - */ - protected abstract boolean isServerSide(); - - /** * Runs the bare test (either on the client side or on the server side). * This method is overridden from the JUnit * {@link TestCase} class in order to prevent the latter to immediatly * call the <code>setUp()</code> and <code>tearDown()</code> methods * which, in our case, need to be executed on the server side. * + * @todo change the comment * @exception Throwable if any exception is thrown during the test. Any * exception will be displayed by the JUnit Test Runner */ public void runBare() throws Throwable { - if (isServerSide()) - { - getServerDelegate().runBareInit(); - } - else - { - getClientDelegate().runBareInit(); - } + runBareClient(); + } + + private void runBareClient() throws Throwable + { + getClientDelegate().runBareInit(); // Catch the exception just to have a chance to log it try { - runCactusTest(); + getClientDelegate().runTest(); } catch (Throwable t) { - if (!isServerSide()) - { - getClientDelegate().getLogger().debug("Exception in test", t); - } + getClientDelegate().getLogger().debug("Exception in test", t); throw t; } } /** - * Runs a Cactus test case. - * - * @exception Throwable if any error happens during the execution of - * the test + * @see CactusTestCase#runBareServer() */ - protected void runCactusTest() throws Throwable + public void runBareServer() throws Throwable { - if (isServerSide()) - { - // Note: We cannot delegate this piece of code in the - // ServerTestCaseDelegate class as it requires to call - // super.runBare() - - if (getServerDelegate().getWrappedTest() != null) - { - ((TestCase) getServerDelegate().getWrappedTest()).runBare(); - } - else - { - super.runBare(); - } + getServerDelegate().runBareInit(); + + // Note: We cannot delegate this piece of code in the + // ServerTestCaseDelegate class as it requires to call + // super.runBare() + + if (getServerDelegate().getWrappedTest() != null) + { + ((TestCase) getServerDelegate().getWrappedTest()).runBare(); } else { - getClientDelegate().runTest(); + super.runBare(); } } } 1.19 +3 -27 jakarta-cactus/framework/src/java/share/org/apache/cactus/ServletTestCase.java Index: ServletTestCase.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/ServletTestCase.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ServletTestCase.java 30 Nov 2003 20:37:07 -0000 1.18 +++ ServletTestCase.java 6 Dec 2003 10:41:30 -0000 1.19 @@ -64,7 +64,6 @@ import org.apache.cactus.configuration.ServletConfiguration; import org.apache.cactus.internal.client.ClientTestCaseDelegate; import org.apache.cactus.internal.client.WebClientTestCaseDelegate; -import org.apache.cactus.internal.server.ServerTestCaseDelegate; import org.apache.cactus.server.ServletConfigWrapper; /** @@ -76,7 +75,8 @@ * * @version $Id$ */ -public class ServletTestCase extends AbstractCactusTestCase +public class ServletTestCase + extends AbstractCactusTestCase implements CactusTestCase { /** * Valid <code>HttpServletRequest</code> object that you can access from @@ -147,28 +147,4 @@ return new WebClientTestCaseDelegate( this, theTest, new ServletConfiguration()); } - - /** - * @see AbstractCactusTestCase#createServerTestCaseDelegate(Test) - */ - protected ServerTestCaseDelegate createServerTestCaseDelegate( - Test theTest) - { - return new ServerTestCaseDelegate(this, theTest); - } - - /** - * @see AbstractCactusTestCase#isServerSide() - */ - protected boolean isServerSide() - { - boolean result = false; - - if (this.request != null) - { - result = true; - } - return result; - } - } 1.1 jakarta-cactus/framework/src/java/share/org/apache/cactus/CactusTestCase.java Index: CactusTestCase.java =================================================================== /* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2003 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 karawilliams@example.com. * * 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; /** * Common interface that must be implemented by all Cactus test cases. * * @author <a href="mailto:karawilliams@example.com">Vincent Massol</a> * * @version $Id: CactusTestCase.java,v 1.1 2003/12/06 10:41:30 vmassol Exp $ */ public interface CactusTestCase { /** * Executes JUnit tests on the server side. It is the equivalent of * {@link org.junit.framework.TestCase#runBare()} but run on the server * side. * * @throws Throwable if an error occurred when running the test on the * server side */ void runBareServer() throws Throwable; } 1.21 +3 -26 jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/FilterTestCase.java Index: FilterTestCase.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/FilterTestCase.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- FilterTestCase.java 30 Nov 2003 20:37:08 -0000 1.20 +++ FilterTestCase.java 6 Dec 2003 10:41:30 -0000 1.21 @@ -64,7 +64,6 @@ import org.apache.cactus.configuration.FilterConfiguration; import org.apache.cactus.internal.client.ClientTestCaseDelegate; import org.apache.cactus.internal.client.WebClientTestCaseDelegate; -import org.apache.cactus.internal.server.ServerTestCaseDelegate; import org.apache.cactus.server.FilterConfigWrapper; /** @@ -76,7 +75,8 @@ * * @version $Id$ */ -public class FilterTestCase extends AbstractCactusTestCase +public class FilterTestCase + extends AbstractCactusTestCase implements CactusTestCase { /** * Valid <code>HttpServletRequest</code> object that you can access from @@ -146,28 +146,5 @@ { return new WebClientTestCaseDelegate(this, theTest, new FilterConfiguration()); - } - - /** - * @see AbstractCactusTestCase#createServerTestCaseDelegate(Test) - */ - protected ServerTestCaseDelegate createServerTestCaseDelegate( - Test theTest) - { - return new ServerTestCaseDelegate(this, theTest); - } - - /** - * @see AbstractCactusTestCase#isServerSide() - */ - protected boolean isServerSide() - { - boolean result = false; - - if (this.request != null) - { - result = true; - } - return result; } } 1.25 +11 -2 jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractWebTestCaller.java Index: AbstractWebTestCaller.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractWebTestCaller.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- AbstractWebTestCaller.java 2 Nov 2003 19:10:50 -0000 1.24 +++ AbstractWebTestCaller.java 6 Dec 2003 10:41:30 -0000 1.25 @@ -66,6 +66,7 @@ import junit.framework.Test; import junit.framework.TestCase; +import org.apache.cactus.CactusTestCase; import org.apache.cactus.HttpServiceDefinition; import org.apache.cactus.ServiceEnumeration; import org.apache.cactus.WebTestResult; @@ -153,7 +154,15 @@ setTestCaseFields(testInstance); // Call it's method corresponding to the current test case - testInstance.runBare(); + if (testInstance instanceof CactusTestCase) + { + ((CactusTestCase) testInstance).runBareServer(); + + } + else + { + testInstance.runBare(); + } // Return an instance of <code>WebTestResult</code> with a // positive result. --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 10:45:10 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 88420 invoked from network); 6 Dec 2003 10:45:10 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 10:45:10 -0000 Received: (qmail 46105 invoked by uid 500); 6 Dec 2003 10:44:44 -0000 Delivered-To: karawilliams@example.com Received: (qmail 46076 invoked by uid 500); 6 Dec 2003 10:44:43 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 46063 invoked by uid 500); 6 Dec 2003 10:44:43 -0000 Received: (qmail 46060 invoked from network); 6 Dec 2003 10:44:43 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 10:44:43 -0000 Received: (qmail 88408 invoked by uid 1262); 6 Dec 2003 10:45:09 -0000 Date: 6 Dec 2003 10:45:09 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework/src/java/share/org/apache/cactus/internal/server ServerTestCaseDelegate.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 02:45:09 Modified: framework/src/java/share/org/apache/cactus/internal/server ServerTestCaseDelegate.java Log: more javadoc Revision Changes Path 1.4 +3 -1 jakarta-cactus/framework/src/java/share/org/apache/cactus/internal/server/ServerTestCaseDelegate.java Index: ServerTestCaseDelegate.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/internal/server/ServerTestCaseDelegate.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ServerTestCaseDelegate.java 31 Aug 2003 14:17:57 -0000 1.3 +++ ServerTestCaseDelegate.java 6 Dec 2003 10:45:09 -0000 1.4 @@ -138,6 +138,8 @@ } /** + * Perform server side initializations before each test, such as + * initializating the logger. */ public void runBareInit() { --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 10:46:31 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 88669 invoked from network); 6 Dec 2003 10:46:31 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 10:46:31 -0000 Received: (qmail 46938 invoked by uid 500); 6 Dec 2003 10:46:04 -0000 Delivered-To: karawilliams@example.com Received: (qmail 46856 invoked by uid 500); 6 Dec 2003 10:46:04 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 46837 invoked by uid 500); 6 Dec 2003 10:46:04 -0000 Received: (qmail 46834 invoked from network); 6 Dec 2003 10:46:04 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 10:46:04 -0000 Received: (qmail 88657 invoked by uid 1262); 6 Dec 2003 10:46:30 -0000 Date: 6 Dec 2003 10:46:30 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/samples/servlet/src/test-cactus/share/org/apache/cactus/sample/servlet/unit TestTearDownException.java TestServerSideExceptions.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 02:46:30 Modified: samples/servlet/src/test-cactus/share/org/apache/cactus/sample/servlet/unit TestTearDownException.java TestServerSideExceptions.java Log: Changed internal tests due to the removal of runCactusTest(). The tests are now using only public API/SPI. Revision Changes Path 1.2 +3 -3 jakarta-cactus/samples/servlet/src/test-cactus/share/org/apache/cactus/sample/servlet/unit/TestTearDownException.java Index: TestTearDownException.java =================================================================== RCS file: /home/cvs/jakarta-cactus/samples/servlet/src/test-cactus/share/org/apache/cactus/sample/servlet/unit/TestTearDownException.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestTearDownException.java 30 Nov 2003 12:19:42 -0000 1.1 +++ TestTearDownException.java 6 Dec 2003 10:46:30 -0000 1.2 @@ -73,11 +73,11 @@ /** * Intercepts running test cases to check for normal exceptions. */ - protected void runCactusTest() + public void runBare() { try { - super.runCactusTest(); + super.runBare(); } catch (Throwable e) { 1.2 +3 -3 jakarta-cactus/samples/servlet/src/test-cactus/share/org/apache/cactus/sample/servlet/unit/TestServerSideExceptions.java Index: TestServerSideExceptions.java =================================================================== RCS file: /home/cvs/jakarta-cactus/samples/servlet/src/test-cactus/share/org/apache/cactus/sample/servlet/unit/TestServerSideExceptions.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- TestServerSideExceptions.java 30 Nov 2003 12:19:42 -0000 1.1 +++ TestServerSideExceptions.java 6 Dec 2003 10:46:30 -0000 1.2 @@ -125,11 +125,11 @@ * * @exception Throwable on test failure */ - protected void runCactusTest() throws Throwable + public void runBare() throws Throwable { try { - super.runCactusTest(); + super.runBare(); } catch (AssertionFailedErrorWrapper e) { --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 10:50:14 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 89446 invoked from network); 6 Dec 2003 10:50:14 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 10:50:14 -0000 Received: (qmail 49055 invoked by uid 500); 6 Dec 2003 10:49:48 -0000 Delivered-To: karawilliams@example.com Received: (qmail 49029 invoked by uid 500); 6 Dec 2003 10:49:47 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 49016 invoked by uid 500); 6 Dec 2003 10:49:47 -0000 Received: (qmail 49013 invoked from network); 6 Dec 2003 10:49:47 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 10:49:47 -0000 Received: (qmail 89431 invoked by uid 1262); 6 Dec 2003 10:50:13 -0000 Date: 6 Dec 2003 10:50:13 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework/src/java/share/org/apache/cactus AbstractCactusTestCase.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 02:50:13 Modified: framework/src/java/share/org/apache/cactus AbstractCactusTestCase.java Log: more javadoc Revision Changes Path 1.3 +10 -8 jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractCactusTestCase.java Index: AbstractCactusTestCase.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractCactusTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AbstractCactusTestCase.java 6 Dec 2003 10:41:30 -0000 1.2 +++ AbstractCactusTestCase.java 6 Dec 2003 10:50:13 -0000 1.3 @@ -204,13 +204,10 @@ } /** - * Runs the bare test (either on the client side or on the server side). - * This method is overridden from the JUnit - * {@link TestCase} class in order to prevent the latter to immediatly - * call the <code>setUp()</code> and <code>tearDown()</code> methods - * which, in our case, need to be executed on the server side. + * JUnit method that is used to run the tests. However, we're intercepting + * it so that we can call the server side of Cactus where the tests will + * be run (instead of on the client side). * - * @todo change the comment * @exception Throwable if any exception is thrown during the test. Any * exception will be displayed by the JUnit Test Runner */ @@ -218,7 +215,12 @@ { runBareClient(); } - + + /** + * Introduced for symmetry with {@link #runBareServer()}. + * + * @see #runBare() + */ private void runBareClient() throws Throwable { getClientDelegate().runBareInit(); --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 10:57:23 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 90913 invoked from network); 6 Dec 2003 10:57:23 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 10:57:23 -0000 Received: (qmail 50698 invoked by uid 500); 6 Dec 2003 10:56:56 -0000 Delivered-To: karawilliams@example.com Received: (qmail 50673 invoked by uid 500); 6 Dec 2003 10:56:56 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 50660 invoked by uid 500); 6 Dec 2003 10:56:56 -0000 Received: (qmail 50656 invoked from network); 6 Dec 2003 10:56:56 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 10:56:56 -0000 Received: (qmail 90906 invoked by uid 1262); 6 Dec 2003 10:57:22 -0000 Date: 6 Dec 2003 10:57:22 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework/src/java/share/org/apache/cactus CactusTestCase.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 02:57:22 Modified: framework/src/java/share/org/apache/cactus CactusTestCase.java Log: fixed javadoc Revision Changes Path 1.2 +2 -2 jakarta-cactus/framework/src/java/share/org/apache/cactus/CactusTestCase.java Index: CactusTestCase.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/CactusTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CactusTestCase.java 6 Dec 2003 10:41:30 -0000 1.1 +++ CactusTestCase.java 6 Dec 2003 10:57:22 -0000 1.2 @@ -67,7 +67,7 @@ { /** * Executes JUnit tests on the server side. It is the equivalent of - * {@link org.junit.framework.TestCase#runBare()} but run on the server + * {@link junit.framework.TestCase#runBare()} but run on the server * side. * * @throws Throwable if an error occurred when running the test on the --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 14:00:08 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 38308 invoked from network); 6 Dec 2003 14:00:08 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 14:00:08 -0000 Received: (qmail 45802 invoked by uid 500); 6 Dec 2003 14:00:05 -0000 Delivered-To: karawilliams@example.com Received: (qmail 45720 invoked by uid 500); 6 Dec 2003 14:00:04 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 45707 invoked by uid 500); 6 Dec 2003 14:00:04 -0000 Received: (qmail 45703 invoked from network); 6 Dec 2003 14:00:04 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 14:00:04 -0000 Received: (qmail 38290 invoked by uid 1262); 6 Dec 2003 14:00:07 -0000 Date: 6 Dec 2003 14:00:07 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework/src/java/share/org/apache/cactus AbstractCactusTestCase.java JspTestCase.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 06:00:07 Modified: framework/src/java/share/org/apache/cactus AbstractCactusTestCase.java JspTestCase.java Log: - Tightened API - Removed unused method Revision Changes Path 1.4 +6 -6 jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractCactusTestCase.java Index: AbstractCactusTestCase.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/AbstractCactusTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AbstractCactusTestCase.java 6 Dec 2003 10:50:13 -0000 1.3 +++ AbstractCactusTestCase.java 6 Dec 2003 14:00:07 -0000 1.4 @@ -120,7 +120,7 @@ * wrap * @return the server side test case delegate to use */ - protected ServerTestCaseDelegate createServerTestCaseDelegate(Test theTest) + private ServerTestCaseDelegate createServerTestCaseDelegate(Test theTest) { return new ServerTestCaseDelegate(this, theTest); } @@ -163,7 +163,7 @@ /** * @param theDelegate the client test case delegate */ - void setClientDelegate(ClientTestCaseDelegate theDelegate) + private void setClientDelegate(ClientTestCaseDelegate theDelegate) { this.clientDelegate = theDelegate; } @@ -171,7 +171,7 @@ /** * @param theDelegate the client test case delegate */ - void setServerDelegate(ServerTestCaseDelegate theDelegate) + private void setServerDelegate(ServerTestCaseDelegate theDelegate) { this.serverDelegate = theDelegate; } @@ -179,7 +179,7 @@ /** * @return the client test case delegate */ - ClientTestCaseDelegate getClientDelegate() + private ClientTestCaseDelegate getClientDelegate() { return this.clientDelegate; } @@ -197,7 +197,7 @@ * * @param theTest a pure JUnit Test that Cactus will wrap */ - void init(Test theTest) + private void init(Test theTest) { setClientDelegate(createClientTestCaseDelegate(theTest)); setServerDelegate(createServerTestCaseDelegate(theTest)); 1.16 +1 -11 jakarta-cactus/framework/src/java/share/org/apache/cactus/JspTestCase.java Index: JspTestCase.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/JspTestCase.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- JspTestCase.java 30 Nov 2003 20:37:07 -0000 1.15 +++ JspTestCase.java 6 Dec 2003 14:00:07 -0000 1.16 @@ -63,7 +63,6 @@ import org.apache.cactus.configuration.JspConfiguration; import org.apache.cactus.internal.client.ClientTestCaseDelegate; import org.apache.cactus.internal.client.WebClientTestCaseDelegate; -import org.apache.cactus.internal.server.ServerTestCaseDelegate; import org.apache.cactus.server.PageContextWrapper; /** @@ -127,14 +126,5 @@ { return new WebClientTestCaseDelegate(this, theTest, new JspConfiguration()); - } - - /** - * @see AbstractCactusTestCase#createServerTestCaseDelegate(Test) - */ - protected ServerTestCaseDelegate createServerTestCaseDelegate( - Test theTest) - { - return new ServerTestCaseDelegate(this, theTest); } } --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 17:30:16 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 94814 invoked from network); 6 Dec 2003 17:30:16 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 17:30:16 -0000 Received: (qmail 65134 invoked by uid 500); 6 Dec 2003 17:30:09 -0000 Delivered-To: karawilliams@example.com Received: (qmail 65049 invoked by uid 500); 6 Dec 2003 17:30:09 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 65036 invoked by uid 500); 6 Dec 2003 17:30:09 -0000 Received: (qmail 65033 invoked from network); 6 Dec 2003 17:30:08 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 17:30:08 -0000 Received: (qmail 94808 invoked by uid 1262); 6 Dec 2003 17:30:15 -0000 Date: 6 Dec 2003 17:30:15 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework/src/test/share/org/apache/cactus AbstractTestAbstractTestCase.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 09:30:15 Modified: framework/src/test/share/org/apache/cactus AbstractTestAbstractTestCase.java Log: - Made call to endXXX methods generic. - Moved them from WebClientTestCaseDelegate to AbstractClientTestCaseDelegate Revision Changes Path 1.4 +4 -2 jakarta-cactus/framework/src/test/share/org/apache/cactus/AbstractTestAbstractTestCase.java Index: AbstractTestAbstractTestCase.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/test/share/org/apache/cactus/AbstractTestAbstractTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AbstractTestAbstractTestCase.java 2 Nov 2003 23:41:43 -0000 1.3 +++ AbstractTestAbstractTestCase.java 6 Dec 2003 17:30:15 -0000 1.4 @@ -64,6 +64,7 @@ import junit.framework.TestCase; import org.apache.cactus.client.ClientException; +import org.apache.cactus.client.WebResponseObjectFactory; import org.apache.cactus.configuration.ServletConfiguration; import org.apache.cactus.configuration.WebConfiguration; import org.apache.cactus.internal.WebRequestImpl; @@ -128,7 +129,8 @@ new ByteArrayInputStream("".getBytes())); // Create a WebResponse object and call the end method - delegator.callEndMethod(request, connection); + delegator.callEndMethod(request, + new WebResponseObjectFactory(connection)); } catch (AssertionFailedError e) { --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 17:30:59 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 94954 invoked from network); 6 Dec 2003 17:30:59 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 17:30:59 -0000 Received: (qmail 65459 invoked by uid 500); 6 Dec 2003 17:30:52 -0000 Delivered-To: karawilliams@example.com Received: (qmail 65432 invoked by uid 500); 6 Dec 2003 17:30:52 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 65419 invoked by uid 500); 6 Dec 2003 17:30:51 -0000 Received: (qmail 65416 invoked from network); 6 Dec 2003 17:30:51 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 17:30:51 -0000 Received: (qmail 94945 invoked by uid 1262); 6 Dec 2003 17:30:58 -0000 Date: 6 Dec 2003 17:30:58 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework/src/java/share/org/apache/cactus/client ResponseObjectFactory.java WebResponseObjectFactory.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 09:30:58 Modified: framework/src/java/share/org/apache/cactus/client ResponseObjectFactory.java WebResponseObjectFactory.java Log: - Made call to endXXX methods generic. - Moved them from WebClientTestCaseDelegate to AbstractClientTestCaseDelegate Revision Changes Path 1.5 +3 -7 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/ResponseObjectFactory.java Index: ResponseObjectFactory.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/ResponseObjectFactory.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ResponseObjectFactory.java 26 May 2003 11:45:25 -0000 1.4 +++ ResponseObjectFactory.java 6 Dec 2003 17:30:58 -0000 1.5 @@ -56,8 +56,6 @@ */ package org.apache.cactus.client; -import java.net.HttpURLConnection; - import org.apache.cactus.Request; /** @@ -76,12 +74,10 @@ * * @param theClassName the class name of the object to construct * @param theRequest the request that was sent by Cactus to the server side - * @param theConnection the HTTP connection object that was used by Cactus - * to connect to the server side * @return the response object that will be passed to <code>endXXX()</code> * methods and to the global end method * @throws ClientException if it fails to construct the response object */ - Object getResponseObject(String theClassName, Request theRequest, - HttpURLConnection theConnection) throws ClientException; + Object getResponseObject(String theClassName, Request theRequest) + throws ClientException; } 1.6 +21 -6 jakarta-cactus/framework/src/java/share/org/apache/cactus/client/WebResponseObjectFactory.java Index: WebResponseObjectFactory.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/client/WebResponseObjectFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- WebResponseObjectFactory.java 26 May 2003 11:45:25 -0000 1.5 +++ WebResponseObjectFactory.java 6 Dec 2003 17:30:58 -0000 1.6 @@ -76,30 +76,45 @@ public class WebResponseObjectFactory implements ResponseObjectFactory { /** + * Connection object used to connect to the Cactus server side. Required + * to create the response object. + */ + private HttpURLConnection connection; + + /** + * @param theConnection the connection object used to connect to the + * Cactus server side + */ + public WebResponseObjectFactory(HttpURLConnection theConnection) + { + this.connection = theConnection; + } + + /** * @see ResponseObjectFactory#getResponseObject */ - public Object getResponseObject(String theClassName, Request theRequest, - HttpURLConnection theConnection) throws ClientException + public Object getResponseObject(String theClassName, Request theRequest) + throws ClientException { Object responseObject; // Is it a Http Unit WebResponse ? if (theClassName.equals("com.meterware.httpunit.WebResponse")) { - responseObject = createHttpUnitWebResponse(theConnection); + responseObject = createHttpUnitWebResponse(this.connection); // Is it a Cactus WebResponse ? } else if (theClassName.equals("org.apache.cactus.WebResponse")) { responseObject = new WebResponse((WebRequest) theRequest, - theConnection); + this.connection); // Is it an old HttpURLConnection (deprecated) ? } else if (theClassName.equals("java.net.HttpURLConnection")) { - responseObject = theConnection; + responseObject = this.connection; // Else it is an error ... } --------------------------------------------------------------------- To unsubscribe, e-mail: karawilliams@example.com For additional commands, e-mail: karawilliams@example.com From cactus-dev-karawilliams@example.com Sat Dec 06 17:33:43 2003 Return-Path: <cactus-dev-karawilliams@example.com> Delivered-To: karawilliams@example.com Received: (qmail 95440 invoked from network); 6 Dec 2003 17:33:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 6 Dec 2003 17:33:43 -0000 Received: (qmail 66266 invoked by uid 500); 6 Dec 2003 17:33:36 -0000 Delivered-To: karawilliams@example.com Received: (qmail 66240 invoked by uid 500); 6 Dec 2003 17:33:35 -0000 Mailing-List: contact karawilliams@example.com; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:karawilliams@example.com> List-Subscribe: <mailto:karawilliams@example.com> List-Help: <mailto:karawilliams@example.com> List-Post: <mailto:karawilliams@example.com> List-Id: "Cactus Developers List" <cactus-dev.jakarta.apache.org> Reply-To: "Cactus Developers List" <karawilliams@example.com> Delivered-To: mailing list karawilliams@example.com Received: (qmail 66227 invoked by uid 500); 6 Dec 2003 17:33:35 -0000 Received: (qmail 66224 invoked from network); 6 Dec 2003 17:33:35 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 6 Dec 2003 17:33:35 -0000 Received: (qmail 95431 invoked by uid 1262); 6 Dec 2003 17:33:42 -0000 Date: 6 Dec 2003 17:33:42 -0000 Message-ID: <karawilliams@example.com> From: karawilliams@example.com To: karawilliams@example.com Subject: cvs commit: jakarta-cactus/framework/src/java/share/org/apache/cactus/internal WebRequestImpl.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N vmassol 2003/12/06 09:33:42 Modified: framework/src/java/share/org/apache/cactus/internal/client WebClientTestCaseDelegate.java AbstractClientTestCaseDelegate.java framework/src/java/share/org/apache/cactus/internal WebRequestImpl.java Log: - Made call to endXXX methods generic. - Moved them from WebClientTestCaseDelegate to AbstractClientTestCaseDelegate Revision Changes Path 1.5 +9 -164 jakarta-cactus/framework/src/java/share/org/apache/cactus/internal/client/WebClientTestCaseDelegate.java Index: WebClientTestCaseDelegate.java =================================================================== RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/internal/client/WebClientTestCaseDelegate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- WebClientTestCaseDelegate.java 30 Nov 2003 20:37:08 -0000 1.4 +++ WebClientTestCaseDelegate.java 6 Dec 2003 17:33:42 -0000 1.5 @@ -56,17 +56,12 @@ */ package org.apache.cactus.internal.client; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; - import java.net.HttpURLConnection; import junit.framework.Test; import org.apache.cactus.RequestDirectives; import org.apache.cactus.WebRequest; -import org.apache.cactus.client.ClientException; import org.apache.cactus.client.WebResponseObjectFactory; import org.apache.cactus.client.connector.http.DefaultHttpClient; import org.apache.cactus.configuration.Configuration; @@ -74,9 +69,7 @@ import org.apache.cactus.internal.WebRequestImpl; /** - * Delegator extension to support test cases using the HTTP protocol. It adds - * support for end methods (as they are dependent on the protocol used, which - * is HTTP here). + * Delegator extension to support test cases using the HTTP protocol. * * @author <a href="mailto:karawilliams@example.com">Vincent Massol</a> * @@ -97,154 +90,6 @@ } /** - * Call the global end method. This is the method that is called after - * each test if it exists. It is called on the client side only. - * - * @param theRequest the request data that were used to open the - * connection. - * @param theConnection the <code>HttpURLConnection</code> that was used - * to open the connection to the redirection servlet. The response - * codes, headers, cookies can be checked using the get methods of - * this object. - * @param theMethodName the name of the end method to call - * @param theResponse the Response object if it exists. Can be null in - * which case it is created from the HttpURLConnection - * @return the created WebReponse object (either Cactus or HttpClient) - * @exception Throwable any error that occurred when calling the end method - * for the current test case. - */ - private Object callGenericEndMethod(WebRequest theRequest, - HttpURLConnection theConnection, String theMethodName, - Object theResponse) throws Throwable - { - Method methodToCall = null; - Object paramObject = null; - - Method[] methods = getTest().getClass().getMethods(); - - for (int i = 0; i < methods.length; i++) - { - if (methods[i].getName().equals(theMethodName)) - { - // Check return type - if (!methods[i].getReturnType().getName().equals("void")) - { - fail("The method [" + methods[i].getName() - + "] should return void and not [" - + methods[i].getReturnType().getName() + "]"); - } - - // Check if method is public - if (!Modifier.isPublic(methods[i].getModifiers())) - { - fail("Method [" + methods[i].getName() - + "] should be declared public"); - } - - // Check parameters - Class[] parameters = methods[i].getParameterTypes(); - - // Verify only one parameter is defined - if (parameters.length != 1) - { - fail("The method [" + methods[i].getName() - + "] must only have a single parameter"); - } - - paramObject = theResponse; - - if (paramObject == null) - { - try - { - paramObject = new WebResponseObjectFactory() - .getResponseObject(parameters[0].getName(), - theRequest, theConnection); - } - catch (ClientException e) - { - throw new ClientException("The method [" - + methods[i].getName() - + "] has a bad parameter of type [" - + parameters[0].getName() + "]", e); - } - } - - // Has a method to call already been found ? - if (methodToCall != null) - { - fail("There can only be one method [" - + methods[i].getName() + "] per test case. " - + "Test case [" + this.getCurrentTestName() - + "] has two at least !"); - } - - methodToCall = methods[i]; - } - } - - if (methodToCall != null) - { - try - { - methodToCall.invoke(getTest(), new Object[] {paramObject}); - } - catch (InvocationTargetException e) - { - e.fillInStackTrace(); - throw e.getTargetException(); - } - catch (IllegalAccessException e) - { - e.fillInStackTrace(); - throw e; - } - } - - return paramObject; - } - - /** - * Call the client tear down up method if it exists. - * - * @param theRequest the request data that were used to open the - * connection. - * @param theConnection the <code>HttpURLConnection</code> that was used - * to open the connection to the redirection servlet. The response - * codes, headers, cookies can be checked using the get methods of - * this object. - * @param theResponse the Response object if it exists. Can be null in - * which case it is created from the HttpURLConnection - * @exception Throwable any error that occurred when calling the method - */ - protected void callClientGlobalEnd(WebRequest theRequest, - HttpURLConnection theConnection, Object theResponse) throws Throwable - { - callGenericEndMethod(theRequest, theConnection, - CLIENT_GLOBAL_END_METHOD, theResponse); - } - - /** - * Call the test case end method - * - * @param theRequest the request data that were used to open the - * connection. - * @param theConnection the <code>HttpURLConnection</code> that was used - * to open the connection to the redirection servlet. The response - * codes, headers, cookies can be checked using the get methods of - * this object. - * @return the created WebReponse object (either Cactus or HttpClient) - * @exception Throwable any error that occurred when calling the end method - * for the current test case. - */ - public Object callEndMethod(WebRequest theRequest, - HttpURLConnection theConnection) throws Throwable - { - return callGenericEndMethod(theRequest, theConnection, - getEndMethodName(), null); - } - - /** * Runs a test case. This method is overriden from the JUnit * <code>TestCase</code> class in order to seamlessly call the * Cactus redirection servlet. @@ -275,17 +120,19 @@ (WebConfiguration) getConfiguration()); // Call the set up and begin methods to fill the request object - callClientGlobalBegin(request); + callGlobalBeginMethod(request); callBeginMethod(request); // Run the web test HttpURLConnection connection = runWebTest(request, theHttpClient); // Call
{'source': 'Apache Software Foundation Public Mail Archives'}