tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r1227751 - in /tapestry/tapestry5/trunk: tapestry-beanvalidator/src/test/conf/ tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/ tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/...
Date Thu, 05 Jan 2012 18:52:20 GMT
Author: hlship
Date: Thu Jan  5 18:52:19 2012
New Revision: 1227751

URL: http://svn.apache.org/viewvc?rev=1227751&view=rev
Log:
Remove deprecated AbstractIntegrationTestSuite class, refactor tests that used it
Remove deprecated JettyRunner

Added:
    tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/
    tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/external/
    tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/external/TapestryExternalSpringContextIntegrationTest.java
      - copied, changed from r1227750, tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestryExternalSpringContextIntegrationTest.java
    tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/standard/
    tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/standard/TapestrySpringIntegrationTest.java
      - copied, changed from r1227750, tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestrySpringIntegrationTest.java
Removed:
    tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestryExternalSpringContextIntegrationTest.java
    tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestrySpringIntegrationTest.java
    tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/JettyRunner.java
Modified:
    tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/conf/testng.xml
    tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
    tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java
    tapestry/tapestry5/trunk/tapestry-spring/src/test/conf/testng.xml
    tapestry/tapestry5/trunk/tapestry-test/build.gradle
    tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/RunJettyUpload.java
    tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java

Modified: tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/conf/testng.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/conf/testng.xml?rev=1227751&r1=1227750&r2=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/conf/testng.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/conf/testng.xml Thu Jan  5 18:52:19
2012
@@ -1,6 +1,6 @@
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
 <!-- 
-   Copyright 2009 The Apache Software Foundation
+   Copyright 2009, 2012 The Apache Software Foundation
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -16,8 +16,6 @@
 -->
 
 <suite name="Tapestry Bean Validator" parallel="false" thread-count="10" annotations="1.5"
verbose="2">
-    <parameter name="tapestry.integration-webapp" value="src/test/webapp"/>
-
     <test name="Tapestry Bean Validatior Integration Tests">
         <packages>
             <package name="org.apache.tapestry5.beanvalidator.integration"/>

Modified: tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java?rev=1227751&r1=1227750&r2=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
Thu Jan  5 18:52:19 2012
@@ -1,4 +1,4 @@
-// Copyright 2009, 2010 The Apache Software Foundation
+// Copyright 2009, 2010, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -13,25 +13,22 @@
 // limitations under the License.
 package org.apache.tapestry5.beanvalidator.integration;
 
-import org.apache.tapestry5.test.AbstractIntegrationTestSuite;
+import org.apache.tapestry5.test.SeleniumTestCase;
+import org.apache.tapestry5.test.TapestryTestConfiguration;
 import org.testng.annotations.Test;
 
 @Test(sequential = true, groups = "integration")
-public class TapestryBeanValidationIntegrationTests extends AbstractIntegrationTestSuite
+@TapestryTestConfiguration(webAppFolder = "src/test/webapp")
+public class TapestryBeanValidationIntegrationTests extends SeleniumTestCase
 {
-    public TapestryBeanValidationIntegrationTests()
-    {
-        super("src/test/webapp");
-    }
-
     @Test
     public void form_validation() throws Exception
     {
-    	start("Form Validation Demo");
-    	
-    	//Test JSR-303 validator
-    	
-    	clickAndWait(SUBMIT);
+        openLinks("Form Validation Demo");
+
+        //Test JSR-303 validator
+
+        clickAndWait(SUBMIT);
 
         assertTextPresent("Login Name may not be null");
         assertTextPresent("Secret Password may not be null");
@@ -39,173 +36,172 @@ public class TapestryBeanValidationInteg
         assertTextPresent("Favorite Colors may not be null");
         assertTextPresent("More Colors size must be between 3 and 4");
         assertTextPresent("Birth Day may not be null");
-        
+
 
         type("secretPassword", "igor");
-        
-    	addSelection("programmingLanguages-avail", "label=Java");
-    	addSelection("programmingLanguages-avail", "label=Ruby");
-    	click("programmingLanguages-select");
-    	
-    	select("favoriteColors", "label=Green");
-    	
-    	type("birthDay", "01.01.5000");
-    	
-    	clickAndWait(SUBMIT);
-
-    	assertTextPresent("Login Name may not be null");
-    	assertFalse(isTextPresent("Secret Password may not be null"));
-    	assertFalse(isTextPresent("Programming Languages size must be between 2 and 3"));
-    	assertFalse(isTextPresent("Favorite Colors may not be null"));
+
+        addSelection("programmingLanguages-avail", "label=Java");
+        addSelection("programmingLanguages-avail", "label=Ruby");
+        click("programmingLanguages-select");
+
+        select("favoriteColors", "label=Green");
+
+        type("birthDay", "01.01.5000");
+
+        clickAndWait(SUBMIT);
+
+        assertTextPresent("Login Name may not be null");
+        assertFalse(isTextPresent("Secret Password may not be null"));
+        assertFalse(isTextPresent("Programming Languages size must be between 2 and 3"));
+        assertFalse(isTextPresent("Favorite Colors may not be null"));
         assertTextPresent("More Colors size must be between 3 and 4");
-    	assertTextPresent("Birth Day must be in the past");
-        
+        assertTextPresent("Birth Day must be in the past");
+
         //Test Tapestry validator
-        
+
         type("loginName", "igor");
         type("birthDay", "6.04.1978");
 
         check("//input[@value='White']");
         check("//input[@value='Yellow']");
         check("//input[@value='Orange']");
-    	
-    	clickAndWait(SUBMIT);
-    	
-    	assertTextPresent("You must provide at least 5 characters for Login Name.");
-    	assertFalse(isTextPresent("Birth Day must be in the past"));
-    	assertFalse(isTextPresent("More Colors size must be between 3 and 4"));
-        
+
+        clickAndWait(SUBMIT);
+
+        assertTextPresent("You must provide at least 5 characters for Login Name.");
+        assertFalse(isTextPresent("Birth Day must be in the past"));
+        assertFalse(isTextPresent("More Colors size must be between 3 and 4"));
+
         type("loginName", "igor123");
-    	
-    	clickAndWait(SUBMIT);
-    	
-    	assertFalse(isTextPresent("You must provide at least 5 characters for Login Name."));
+
+        clickAndWait(SUBMIT);
+
+        assertFalse(isTextPresent("You must provide at least 5 characters for Login Name."));
     }
 
     @Test
     public void beaneditform_validation() throws Exception
     {
-    	start("BeanEditForm Validation Demo");
-    	
-    	clickAndWait(SUBMIT);
-    	
+        openLinks("BeanEditForm Validation Demo");
+
+        clickAndWait(SUBMIT);
+
         assertTextPresent("User Name may not be null", "Password may not be null");
-        
+
         type("userName", "igor");
-    	
-    	clickAndWait(SUBMIT);
-    	
+
+        clickAndWait(SUBMIT);
+
         assertTextPresent("User Name size must be between 7 and 10", "User Name must match
\"[0-9]+\"");
     }
-    
+
     @Test
     public void inject_validator() throws Exception
     {
-    	start("Inject Validator Demo");
-    	
-    	clickAndWait(SUBMIT);
+        openLinks("Inject Validator Demo");
+
+        clickAndWait(SUBMIT);
 
-    	assertTextPresent("User Name may not be null");
+        assertTextPresent("User Name may not be null");
     }
-    
+
     @Test
     public void client_validaton() throws Exception
     {
-    	start("Client Validation Demo");
-    	
-    	//@NotNull
-    	click(SUBMIT);
-
-    	assertBubbleMessage("notNullValue", "Not Null Value may not be null");
-    	
-    	type("notNullValue", "igor");
-    	
-    	//@Min
-    	type("minValue", "3");
-    	
-    	click(SUBMIT);
-    	
-    	assertBubbleMessage("minValue", "Min Value must be greater than or equal to 6");
-    	
-    	//@Max
-    	type("minValue", "6");
-    	type("maxValue", "123");
-    	
-    	click(SUBMIT);
-    	
-    	assertBubbleMessage("maxValue", "Max Value must be less than or equal to 100");
-    	
-    	//@Null
-    	type("maxValue", "100");
-    	type("nullValue", "igor");
-    	
-    	type("stringSizeValue", "a");
-    	
-    	click(SUBMIT);
-    	
-    	assertBubbleMessage("stringSizeValue", "String Size Value size must be between 3 and
6");
-    	
-    	click(SUBMIT);
-    	
-    	type("stringSizeValue", "ab");
-    	
-    	addSelection("languages-avail", "label=Java");
-    	click("languages-select");
-    	
-    	click(SUBMIT);
-    	
-    	assertBubbleMessage("languages", "Languages size must be between 2 and 3");
-    	
-    	click(SUBMIT);
+        openLinks("Client Validation Demo");
+
+        //@NotNull
+        click(SUBMIT);
+
+        assertBubbleMessage("notNullValue", "Not Null Value may not be null");
+
+        type("notNullValue", "igor");
+
+        //@Min
+        type("minValue", "3");
+
+        click(SUBMIT);
 
-    	assertBubbleMessage("nullValue", "Null Value must be null");
+        assertBubbleMessage("minValue", "Min Value must be greater than or equal to 6");
+
+        //@Max
+        type("minValue", "6");
+        type("maxValue", "123");
+
+        click(SUBMIT);
+
+        assertBubbleMessage("maxValue", "Max Value must be less than or equal to 100");
+
+        //@Null
+        type("maxValue", "100");
+        type("nullValue", "igor");
+
+        type("stringSizeValue", "a");
+
+        click(SUBMIT);
+
+        assertBubbleMessage("stringSizeValue", "String Size Value size must be between 3
and 6");
+
+        click(SUBMIT);
+
+        type("stringSizeValue", "ab");
+
+        addSelection("languages-avail", "label=Java");
+        click("languages-select");
+
+        click(SUBMIT);
+
+        assertBubbleMessage("languages", "Languages size must be between 2 and 3");
+
+        click(SUBMIT);
+
+        assertBubbleMessage("nullValue", "Null Value must be null");
     }
-    
 
-    
+
     @Test
     public void form_client_validation() throws Exception
     {
-    	start("Form Client Validation Demo");
-    	
-    	click(SUBMIT);
-
-    	assertBubbleMessage("loginName", "Login Name may not be null");
-    	assertBubbleMessage("secretPassword", "Secret Password may not be null");
-    	assertBubbleMessage("programmingLanguages", "Programming Languages may not be null");
-    	assertBubbleMessage("favoriteColors", "Favorite Colors may not be null");
-    	assertBubbleMessage("birthDay", "Birth Day may not be null");
-    	
-    	type("loginName", "123");
-    	click(SUBMIT);
-    	
-    	assertBubbleMessage("loginName", "Login Name must match \"[a-zA-Z]+\"");
-    	
-    	type("loginName", "abc");
-    	click(SUBMIT);
-    	
-    	assertBubbleMessage("loginName", "You must provide at least 5 characters for Login Name.");
+        openLinks("Form Client Validation Demo");
+
+        click(SUBMIT);
+
+        assertBubbleMessage("loginName", "Login Name may not be null");
+        assertBubbleMessage("secretPassword", "Secret Password may not be null");
+        assertBubbleMessage("programmingLanguages", "Programming Languages may not be null");
+        assertBubbleMessage("favoriteColors", "Favorite Colors may not be null");
+        assertBubbleMessage("birthDay", "Birth Day may not be null");
+
+        type("loginName", "123");
+        click(SUBMIT);
+
+        assertBubbleMessage("loginName", "Login Name must match \"[a-zA-Z]+\"");
+
+        type("loginName", "abc");
+        click(SUBMIT);
+
+        assertBubbleMessage("loginName", "You must provide at least 5 characters for Login
Name.");
     }
-    
+
     /*
-     * Ensures TAP5-1393 is fixed.
-     */
+    * Ensures TAP5-1393 is fixed.
+    */
     @Test
     public void form_on_prepare() throws Exception
     {
-    	start("OnPrepare Demo");
-    	
-    	clickAndWait(SUBMIT);
-    	
+        openLinks("OnPrepare Demo");
+
+        clickAndWait(SUBMIT);
+
         assertTextPresent("Login Name may not be null", "Secret Password may not be null");
-        
+
         type("loginName", "igor");
-    	
-    	clickAndWait(SUBMIT);
-    	
+
+        clickAndWait(SUBMIT);
+
         assertTextPresent("Login Name size must be between 7 and 10", "Login Name must match
\"[0-9]+\"");
     }
-    
+
     protected final void assertBubbleMessage(String fieldId, String expected)
     {
         String popupId = fieldId + "_errorpopup";
@@ -214,11 +210,4 @@ public class TapestryBeanValidationInteg
 
         assertText(String.format("//div[@id='%s']/span", popupId), expected);
     }
-    
-    protected final void waitForElementToAppear(String elementId)
-    {
-        String condition = String.format("window.$(\"%s\")", elementId);
-
-        waitForCondition(condition, PAGE_LOAD_TIMEOUT);
-    }
 }
\ No newline at end of file

Modified: tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java?rev=1227751&r1=1227750&r2=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/apache/tapestry5/hibernate/integration/TapestryHibernateIntegrationTests.java
Thu Jan  5 18:52:19 2012
@@ -1,4 +1,4 @@
-// Copyright 2008 The Apache Software Foundation
+// Copyright 2008, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,18 +15,15 @@
 package org.apache.tapestry5.hibernate.integration;
 
 import org.apache.tapestry5.internal.hibernate.PersistedEntity;
-import org.apache.tapestry5.test.AbstractIntegrationTestSuite;
+import org.apache.tapestry5.test.SeleniumTestCase;
+import org.apache.tapestry5.test.TapestryTestConfiguration;
 import org.example.app0.entities.User;
 import org.testng.annotations.Test;
 
 @Test(sequential = true, groups = "integration")
-public class TapestryHibernateIntegrationTests extends AbstractIntegrationTestSuite
+@TapestryTestConfiguration(webAppFolder = "src/test/webapp")
+public class TapestryHibernateIntegrationTests extends SeleniumTestCase
 {
-    public TapestryHibernateIntegrationTests()
-    {
-        super("src/test/webapp");
-    }
-
     public void valueencode_all_entity_types() throws Exception
     {
         open("/encodeentities");
@@ -68,29 +65,29 @@ public class TapestryHibernateIntegratio
         clickAndWait("link=set to transient");
         assertTextPresent("Error persisting");
     }
-    
+
     public void sso_entities()
     {
-    	open("/ssoentity");
+        open("/ssoentity");
         assertEquals(getText("//span[@id='name']").length(), 0);
         assertText("//span[@id='persistedEntityClassName']", User.class.getName());
-        
+
         clickAndWait("link=persist entity");
         assertText("//span[@id='name']", "name");
         assertText("//span[@id='persistedEntityClassName']", PersistedEntity.class.getName());
-        
+
         // can set back to null
         clickAndWait("link=set to null");
         assertEquals(getText("//span[@id='name']").length(), 0);
         assertText("//span[@id='persistedEntityClassName']", User.class.getName());
-        
+
         clickAndWait("link=persist entity");
         assertText("//span[@id='name']", "name");
         assertText("//span[@id='persistedEntityClassName']", PersistedEntity.class.getName());
         clickAndWait("link=delete");
         assertEquals(getText("//span[@id='name']").length(), 0);
         assertText("//span[@id='persistedEntityClassName']", User.class.getName());
-        
+
         clickAndWait("link=persist entity");
         assertText("//span[@id='name']", "name");
         assertText("//span[@id='persistedEntityClassName']", PersistedEntity.class.getName());
@@ -103,7 +100,7 @@ public class TapestryHibernateIntegratio
      */
     public void using_cached_with_form()
     {
-        start("Cached Form", "setup");
+        openLinks("Cached Form", "setup");
         assertTextSeries("name_%d", 0);
 
         type("name", "name1");
@@ -117,7 +114,7 @@ public class TapestryHibernateIntegratio
 
     public void commit_after_on_component_methods()
     {
-        start("CommitAfter Demo");
+        openLinks("CommitAfter Demo");
 
         assertText("name", "Diane");
 
@@ -137,7 +134,7 @@ public class TapestryHibernateIntegratio
 
     public void grid()
     {
-        start("Grid Demo", "setup");
+        openLinks("Grid Demo", "setup");
 
         clickAndWait("link=First Name");
 
@@ -147,16 +144,26 @@ public class TapestryHibernateIntegratio
 
         assertText("//td[@class='firstName t-sort-column-descending']", "Joe_9");
     }
-    
+
     public void hibernate_statistics()
     {
-    	open(BASE_URL + "hibernate/Statistics");
-    	
-    	assertTextPresent("Hibernate Statistics");
-    	
-    	assertTextPresent("Entities Statistics");
-    	
-    	assertTextPresent(User.class.getName());
+        open(getBaseURL() + "hibernate/Statistics");
+
+        assertTextPresent("Hibernate Statistics");
+
+        assertTextPresent("Entities Statistics");
+
+        assertTextPresent(User.class.getName());
+    }
+
+    protected final void assertTextSeries(String idFormat, int startIndex, String... values)
+    {
+        for (int i = 0; i < values.length; i++)
+        {
+            String id = String.format(idFormat, startIndex + i);
+
+            assertText(id, values[i]);
+        }
     }
 
 

Modified: tapestry/tapestry5/trunk/tapestry-spring/src/test/conf/testng.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/test/conf/testng.xml?rev=1227751&r1=1227750&r2=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/test/conf/testng.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/test/conf/testng.xml Thu Jan  5 18:52:19
2012
@@ -1,6 +1,6 @@
 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
 <!-- 
-   Copyright 2007 The Apache Software Foundation
+   Copyright 2007, 2012 The Apache Software Foundation
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -16,10 +16,20 @@
 -->
 
 <suite name="Tapesty Spring Integration" parallel="false" thread-count="10" annotations="1.5"
verbose="2">
-    <test name="Tapestry Spring Integration">
+    <test name="Tapestry Spring Unit Tests">
         <packages>
             <package name="org.apache.tapestry5.spring"/>
             <package name="org.apache.tapestry5.internal.spring"/>
         </packages>
     </test>
+    <test name="Tapestry Spring Integration - Standard">
+        <packages>
+            <package name="org.apache.tapestry5.spring.integration.standard"/>
+        </packages>
+    </test>
+    <test name="Tapestry Spring Integration - External Configuration">
+        <packages>
+            <package name="org.apache.tapestry5.spring.integration.external"/>
+        </packages>
+    </test>
 </suite>

Copied: tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/external/TapestryExternalSpringContextIntegrationTest.java
(from r1227750, tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestryExternalSpringContextIntegrationTest.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/external/TapestryExternalSpringContextIntegrationTest.java?p2=tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/external/TapestryExternalSpringContextIntegrationTest.java&p1=tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestryExternalSpringContextIntegrationTest.java&r1=1227750&r2=1227751&rev=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestryExternalSpringContextIntegrationTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/external/TapestryExternalSpringContextIntegrationTest.java
Thu Jan  5 18:52:19 2012
@@ -1,4 +1,4 @@
-// Copyright 2011 The Apache Software Foundation
+// Copyright 2011, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,22 +12,19 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry5.spring;
+package org.apache.tapestry5.spring.integration.external;
 
-import org.apache.tapestry5.test.AbstractIntegrationTestSuite;
+import org.apache.tapestry5.test.SeleniumTestCase;
+import org.apache.tapestry5.test.TapestryTestConfiguration;
 import org.testng.annotations.Test;
 
-public class TapestryExternalSpringContextIntegrationTest extends AbstractIntegrationTestSuite
+@TapestryTestConfiguration(webAppFolder = "src/test/webapp1")
+public class TapestryExternalSpringContextIntegrationTest extends SeleniumTestCase
 {
-    public TapestryExternalSpringContextIntegrationTest()
-    {
-        super("src/test/webapp1");
-    }
-
     @Test
     public void external_context_integration_test() throws Exception
     {
-        open(BASE_URL);
+        openBaseURL();
 
         assertTextPresent("Demonstrates Spring Context Configured Externally", "Instantiated
via a factory bean.");
     }

Copied: tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/standard/TapestrySpringIntegrationTest.java
(from r1227750, tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestrySpringIntegrationTest.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/standard/TapestrySpringIntegrationTest.java?p2=tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/standard/TapestrySpringIntegrationTest.java&p1=tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestrySpringIntegrationTest.java&r1=1227750&r2=1227751&rev=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/TapestrySpringIntegrationTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/apache/tapestry5/spring/integration/standard/TapestrySpringIntegrationTest.java
Thu Jan  5 18:52:19 2012
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2009, 2011 The Apache Software Foundation
+// Copyright 2007, 2008, 2009, 2011, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,22 +12,21 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry5.spring;
+package org.apache.tapestry5.spring.integration.standard;
 
-import org.apache.tapestry5.test.AbstractIntegrationTestSuite;
+import org.apache.tapestry5.test.SeleniumTestCase;
+import org.apache.tapestry5.test.TapestryTestConfiguration;
 import org.testng.annotations.Test;
 
-public class TapestrySpringIntegrationTest extends AbstractIntegrationTestSuite
+@TapestryTestConfiguration(webAppFolder = "src/test/webapp")
+public class TapestrySpringIntegrationTest extends SeleniumTestCase
 {
-    public TapestrySpringIntegrationTest()
-    {
-        super("src/test/webapp");
-    }
+
 
     @Test
     public void integration_test() throws Exception
     {
-        open(BASE_URL);
+        openBaseURL();
 
         type("input", "paris in the springtime");
         clickAndWait("//input[@value='Convert']");
@@ -38,7 +37,7 @@ public class TapestrySpringIntegrationTe
     @Test
     public void access_to_spring_context() throws Exception
     {
-        open(BASE_URL);
+        openBaseURL();
 
         String text = getText("beans");
         assertTrue(text.contains("upcase"));
@@ -47,7 +46,7 @@ public class TapestrySpringIntegrationTe
     @Test
     public void customize_pipeline_is_invoked() throws Exception
     {
-        open(BASE_URL);
+        openBaseURL();
 
         assertText("message", "SPRING VERSION 3.1.0.RELEASE: PIPELINE WAS INVOKED");
     }
@@ -55,7 +54,7 @@ public class TapestrySpringIntegrationTe
     @Test
     public void too_many_spring_beans_are_assignable()
     {
-        open(BASE_URL + "bedrock");
+        open(getBaseURL() + "bedrock");
 
         assertTextPresent(
                 "Spring context contains 2 beans assignable to type org.example.testapp.services.Flintstone:
barney, fred.");
@@ -64,7 +63,7 @@ public class TapestrySpringIntegrationTe
     @Test
     public void factory_provided_beans_accessible() throws Exception
     {
-        open(BASE_URL);
+        openBaseURL();
 
         assertEquals(getText("viaFactory"), "Instantiated via a factory bean.");
     }
@@ -72,7 +71,7 @@ public class TapestrySpringIntegrationTe
     @Test
     public void symbol_bean_factory_post_processor() throws Exception
     {
-        open(BASE_URL);
+        openBaseURL();
 
         assertEquals(getText("symbolValueHolder"), "Start page is 'start', Value from Spring
is 'Hello'");
     }
@@ -80,7 +79,7 @@ public class TapestrySpringIntegrationTe
     @Test
     public void no_conflict_on_injected_locale() throws Exception
     {
-        open(BASE_URL);
+        openBaseURL();
 
         assertEquals(getText("locale"), "en");
         assertEquals(getText("selector"), "en");

Modified: tapestry/tapestry5/trunk/tapestry-test/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/build.gradle?rev=1227751&r1=1227750&r2=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-test/build.gradle (original)
+++ tapestry/tapestry5/trunk/tapestry-test/build.gradle Thu Jan  5 18:52:19 2012
@@ -5,8 +5,7 @@ seleniumVersion = '2.14.0'
 dependencies {
   compile "org.seleniumhq.selenium:selenium-java:$seleniumVersion"
   compile "org.seleniumhq.selenium:selenium-server:$seleniumVersion"
-  compile "jetty:org.mortbay.jetty:5.1.12"
-    
+
   compile "org.testng:testng:$testngVersion"
     
   compile "org.eclipse.jetty:jetty-server:$jettyVersion"

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/RunJettyUpload.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/RunJettyUpload.java?rev=1227751&r1=1227750&r2=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/RunJettyUpload.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/RunJettyUpload.java
Thu Jan  5 18:52:19 2012
@@ -1,4 +1,4 @@
-// Copyright 2008 The Apache Software Foundation
+// Copyright 2008, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
 
 package org.apache.tapestry5.upload;
 
-import org.apache.tapestry5.test.JettyRunner;
+import org.apache.tapestry5.test.Jetty7Runner;
 
 import java.io.File;
 
@@ -26,6 +26,6 @@ public class RunJettyUpload
 
         new File(workingDir, "target/tmp").mkdirs();
 
-        new JettyRunner(workingDir, "/", 8080, "src/test/webapp");
+        new Jetty7Runner("src/test/webapp", "/", 8080, 9999).start();
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java?rev=1227751&r1=1227750&r2=1227751&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java
Thu Jan  5 18:52:19 2012
@@ -1,4 +1,4 @@
-// Copyright 2007 The Apache Software Foundation
+// Copyright 2007, 2012 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
 
 package org.apache.tapestry5.upload.integration;
 
-import org.apache.tapestry5.test.AbstractIntegrationTestSuite;
+import org.apache.tapestry5.test.SeleniumTestCase;
 import org.example.upload.pages.Start;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
@@ -23,9 +23,9 @@ import java.io.File;
 import java.io.IOException;
 
 /**
- * . TODO: These tests wont work because Selenium cannot enter values for input type="file'
+ * TODO: These tests wont work because Selenium cannot enter values for input type="file'
  */
-public class UploadIntegrationTest extends AbstractIntegrationTestSuite
+public class UploadIntegrationTest extends SeleniumTestCase
 {
 
     @BeforeTest
@@ -35,8 +35,7 @@ public class UploadIntegrationTest exten
         if (!target.exists())
         {
             target.mkdirs();
-        }
-        else
+        } else
         {
             for (File file : target.listFiles())
             {
@@ -49,12 +48,11 @@ public class UploadIntegrationTest exten
     public void integration_test() throws Exception
     {
 
-        open(BASE_URL);
+        openBaseURL();
 
         File source = new File("test/data/upload.txt");
 
         type("file", source.getCanonicalPath());
         clickAndWait("//input[@value='Upload']");
-
     }
 }



Mime
View raw message