You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2006/07/26 06:38:32 UTC
svn commit: r425617 - in /tapestry/tapestry4/trunk: ./ tapestry-annotations/
tapestry-annotations/src/test/org/apache/tapestry/annotations/
tapestry-contrib/
tapestry-contrib/src/test/org/apache/tapestry/contrib/components/
tapestry-framework/ tapestry...
Author: jkuhnert
Date: Tue Jul 25 21:38:31 2006
New Revision: 425617
URL: http://svn.apache.org/viewvc?rev=425617&view=rev
Log:
Reverted external link changes, fixed contrib and other pom test inclusion issues
Removed:
tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/engine/ExternalLinkPage.java
Modified:
tapestry/tapestry4/trunk/pom.xml
tapestry/tapestry4/trunk/tapestry-annotations/pom.xml
tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java
tapestry/tapestry4/trunk/tapestry-contrib/pom.xml
tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java
tapestry/tapestry4/trunk/tapestry-framework/pom.xml
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/IRequestCycle.java
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/ExternalService.java
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/RequestCycle.java
tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/engine/ExternalServiceTest.java
tapestry/tapestry4/trunk/tapestry-portlet/pom.xml
Modified: tapestry/tapestry4/trunk/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/pom.xml?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/pom.xml (original)
+++ tapestry/tapestry4/trunk/pom.xml Tue Jul 25 21:38:31 2006
@@ -57,7 +57,7 @@
<archive>http://mail-archives.apache.org/mod_mbox/tapestry-commits/</archive>
</mailingList>
</mailingLists>
-
+
<developers>
<developer>
<id>hls</id>
@@ -138,7 +138,7 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>5.0</version>
+ <version>4.7</version>
<classifier>jdk15</classifier>
<scope>test</scope>
</dependency>
@@ -187,6 +187,10 @@
<groupId>tapestry</groupId>
<artifactId>tapestry</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
@@ -252,8 +256,12 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.3-SNAPSHOT</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
Modified: tapestry/tapestry4/trunk/tapestry-annotations/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/pom.xml?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-annotations/pom.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-annotations/pom.xml Tue Jul 25 21:38:31 2006
@@ -14,7 +14,7 @@
</parent>
<name>Annotations</name>
<inceptionYear>2006</inceptionYear>
-
+
<dependencies>
<dependency>
<groupId>org.apache.tapestry</groupId>
@@ -49,11 +49,7 @@
<artifactId>testng</artifactId>
<version>4.7</version>
<classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.javaforge.tapestry</groupId>
- <artifactId>tapestry-testng</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tapestry</groupId>
@@ -81,7 +77,7 @@
</excludes>
</resource>
</resources>
-
+
<testSourceDirectory>src/test</testSourceDirectory>
<testResources>
<testResource>
Modified: tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java (original)
+++ tapestry/tapestry4/trunk/tapestry-annotations/src/test/org/apache/tapestry/annotations/BaseAnnotationTestCase.java Tue Jul 25 21:38:31 2006
@@ -29,7 +29,7 @@
* @since 4.0
*/
-public abstract class BaseAnnotationTestCase extends BaseComponentTestCase
+public class BaseAnnotationTestCase extends BaseComponentTestCase
{
protected Method findMethod(Class clazz, String name)
Modified: tapestry/tapestry4/trunk/tapestry-contrib/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/pom.xml?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/pom.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/pom.xml Tue Jul 25 21:38:31 2006
@@ -44,15 +44,16 @@
<artifactId>easymockclassextension</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>4.7</version>
+ <classifier>jdk15</classifier>
<scope>test</scope>
</dependency>
<dependency>
Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java (original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java Tue Jul 25 21:38:31 2006
@@ -14,7 +14,7 @@
package org.apache.tapestry.contrib.components;
-import static org.easymock.EasyMock.expect;
+import static org.testng.AssertJUnit.assertEquals;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
@@ -23,10 +23,11 @@
import java.io.LineNumberReader;
import java.io.Reader;
-import org.apache.hivemind.test.HiveMindTestCase;
+import org.apache.tapestry.BaseComponentTestCase;
import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.test.Creator;
+import org.testng.annotations.Test;
/**
* Tests for {@link org.apache.tapestry.contrib.components.DumpObject}
@@ -34,7 +35,8 @@
* @author Howard Lewis Ship
* @since 4.0
*/
-public class TestDumpObject extends HiveMindTestCase
+@Test
+public class TestDumpObject extends BaseComponentTestCase
{
/**
* Reads the content of a file, and forms a string. Converts line-number endings in the file
@@ -92,11 +94,11 @@
Creator creator = new Creator();
DumpObject dumpObject = (DumpObject) creator.newInstance(DumpObject.class);
- replayControls();
+ replay();
dumpObject.renderComponent(writer, cycle);
- verifyControls();
+ verify();
}
public void testNormal() throws Exception
@@ -112,24 +114,10 @@
writer.print(expected);
- replayControls();
+ replay();
dumpObject.renderComponent(writer, cycle);
- verifyControls();
- }
-
- private IRequestCycle newCycle(boolean isRewinding)
- {
- IRequestCycle cycle = (IRequestCycle)newMock(IRequestCycle.class);
-
- expect(cycle.isRewinding()).andReturn(isRewinding);
-
- return cycle;
- }
-
- private IMarkupWriter newWriter()
- {
- return (IMarkupWriter) newMock(IMarkupWriter.class);
+ verify();
}
}
Modified: tapestry/tapestry4/trunk/tapestry-framework/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/pom.xml?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/pom.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/pom.xml Tue Jul 25 21:38:31 2006
@@ -74,6 +74,13 @@
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>4.7</version>
+ <classifier>jdk15</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.0</version>
@@ -86,13 +93,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>4.7</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>com.javaforge.tapestry</groupId>
<artifactId>tapestry-testng</artifactId>
</dependency>
@@ -160,7 +160,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.1-SNAPSHOT</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/IRequestCycle.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/IRequestCycle.java?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/IRequestCycle.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/IRequestCycle.java Tue Jul 25 21:38:31 2006
@@ -242,21 +242,6 @@
* @since 3.0
*/
void activate(IPage page);
-
- /**
- * Same behaviour as {@link #activate(IPage)}, except the page is/isn't validated based on the passed
- * in boolean. The default behaviour of page activation is that the activated page <i>is</i> validate.
- *
- * <p>
- * This is currenty implemented to support activating externally linked pages by the ExternalService.
- * </p>
- *
- * @param page
- * The page to activate.
- * @param validate
- * Whether or not to validate the page in addition to activating it.
- */
- void activate(IPage page, boolean validate);
/**
* Returns a query parameter value, or null if not provided in the request. If multiple values
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/ExternalService.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/ExternalService.java?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/ExternalService.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/ExternalService.java Tue Jul 25 21:38:31 2006
@@ -160,17 +160,10 @@
cycle.setListenerParameters(parameters);
- cycle.activate(page, false);
+ cycle.activate(page);
page.activateExternalPage(parameters, cycle);
- // perform page validation ~after~ external link activation
-
- Tapestry.clearMethodInvocations();
-
- page.validate(cycle);
-
- Tapestry.checkMethodInvocation(Tapestry.ABSTRACTPAGE_VALIDATE_METHOD_ID, "validate()", page);
_responseRenderer.renderResponse(cycle);
}
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/RequestCycle.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/RequestCycle.java?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/RequestCycle.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/engine/RequestCycle.java Tue Jul 25 21:38:31 2006
@@ -500,32 +500,22 @@
activate(page);
}
-
+
/** @since 3.0 */
public void activate(IPage page)
{
- activate(page, true);
- }
-
- /** @since 4.1 */
-
- public void activate(IPage page, boolean validate)
- {
Defense.notNull(page, "page");
if (LOG.isDebugEnabled())
LOG.debug("Activating page " + page);
-
- if (validate) {
-
- Tapestry.clearMethodInvocations();
-
- page.validate(this);
-
- Tapestry.checkMethodInvocation(Tapestry.ABSTRACTPAGE_VALIDATE_METHOD_ID, "validate()", page);
- }
+ Tapestry.clearMethodInvocations();
+
+ page.validate(this);
+
+ Tapestry.checkMethodInvocation(Tapestry.ABSTRACTPAGE_VALIDATE_METHOD_ID, "validate()", page);
+
_page = page;
}
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/engine/ExternalServiceTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/engine/ExternalServiceTest.java?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/engine/ExternalServiceTest.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/engine/ExternalServiceTest.java Tue Jul 25 21:38:31 2006
@@ -66,7 +66,7 @@
public void test_Service() throws Exception
{
IRequestCycle cycle = newCycle();
- IExternalPage page = newInstance(ExternalLinkPage.class, new Object[0]);
+ IExternalPage page = newMock(IExternalPage.class);
Object[] parameters = new Object[0];
LinkFactory lf = newLinkFactory();
ResponseRenderer rr = newResponseRenderer();
@@ -78,11 +78,9 @@
trainExtractListenerParameters(lf, cycle, parameters);
cycle.setListenerParameters(parameters);
- cycle.activate(page, false);
+ cycle.activate(page);
page.activateExternalPage(parameters, cycle);
-
- page.validate(cycle);
rr.renderResponse(cycle);
Modified: tapestry/tapestry4/trunk/tapestry-portlet/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-portlet/pom.xml?rev=425617&r1=425616&r2=425617&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-portlet/pom.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-portlet/pom.xml Tue Jul 25 21:38:31 2006
@@ -13,6 +13,53 @@
<version>4.1.0-SNAPSHOT</version>
<inceptionYear>2006</inceptionYear>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tapestry</groupId>
+ <artifactId>tapestry-framework</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>hivemind</groupId>
+ <artifactId>hivemind</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>hivemind</groupId>
+ <artifactId>hivemind-lib</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.9</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>4.7</version>
+ <classifier>jdk15</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>portlet-api</groupId>
+ <artifactId>portlet-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tapestry</groupId>
+ <artifactId>tapestry-test</artifactId>
+ </dependency>
+ </dependencies>
+
<build>
<sourceDirectory>src/java</sourceDirectory>
<testSourceDirectory>src/test</testSourceDirectory>
@@ -93,46 +140,6 @@
</plugin>
</plugins>
</build>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tapestry</groupId>
- <artifactId>tapestry-framework</artifactId>
- <version>4.1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>hivemind</groupId>
- <artifactId>hivemind</artifactId>
- </dependency>
- <dependency>
- <groupId>hivemind</groupId>
- <artifactId>hivemind-lib</artifactId>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymockclassextension</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.9</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>portlet-api</groupId>
- <artifactId>portlet-api</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tapestry</groupId>
- <artifactId>tapestry-test</artifactId>
- </dependency>
- </dependencies>
<reporting>
<outputDirectory>../target/site/tapestry-portlet</outputDirectory>