tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mluse...@apache.org
Subject [09/10] git commit: TAP5-2070 test case to be expanded to use something different then Selenium since it doesn't check http status code
Date Sat, 03 Aug 2013 12:08:56 GMT
TAP5-2070 test case to be expanded to use something different then Selenium since it doesn't
check http status code


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/6762367c
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/6762367c
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/6762367c

Branch: refs/heads/master
Commit: 6762367c1f0369814089f3c0babdc93f71238094
Parents: d1fabec
Author: Massimo Lusetti <mlusetti@apache.org>
Authored: Sat Aug 3 14:07:01 2013 +0200
Committer: Massimo Lusetti <mlusetti@apache.org>
Committed: Sat Aug 3 14:07:01 2013 +0200

----------------------------------------------------------------------
 .../tapestry5/integration/app1/pages/Index.java |  4 +++-
 .../services/ComponentEventImplTest.java        | 24 ++++++++++----------
 .../structure/ComponentPageElementImplTest.java | 10 ++++----
 3 files changed, 21 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6762367c/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
index 2142991..866ced7 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
@@ -518,7 +518,9 @@ public class Index
 
                     new Item("OverrideLabelClassDemo", "Override Label Class Demo", "Setting
class attribute on Label component"),
 
-                    new Item("FormLinkParameters", "FormLinkParameters Demo", "Form link
parameters should be unescaped for a hidden field")
+                    new Item("FormLinkParameters", "FormLinkParameters Demo", "Form link
parameters should be unescaped for a hidden field"),
+
+					new Item("UnknownAtcivationContext", "Unknown Activation Context Demo", "Page refuse
to serve if called with an unknown activation context")
             );
 
     static

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6762367c/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
index 0d9d508..9eb353b 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
@@ -62,7 +62,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, false, mockComponentModel(), logger);
 
         assertTrue(event.matches("eventType", "someId", 0));
         assertFalse(event.matches("foo", "someId", 0));
@@ -88,7 +88,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
resources, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
resources, false, mockComponentModel(), logger);
 
         event.storeResult(result);
 
@@ -111,7 +111,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, false, mockComponentModel(), logger);
 
         assertTrue(event.matches("EVENTTYPE", "someid", 0));
 
@@ -131,7 +131,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, false, mockComponentModel(), logger);
 
         assertTrue(event.matches("eventType", "someId", 0));
 
@@ -153,7 +153,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, false, mockComponentModel(), logger);
 
         assertTrue(event.matches("eventtype", "SOMEID", 0));
 
@@ -178,7 +178,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
resources, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
resources, false, mockComponentModel(), logger);
 
         assertSame(event.coerceContext(0, "java.lang.Integer"), value);
 
@@ -199,7 +199,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
null, false, mockComponentModel(), logger);
 
         event.setMethodDescription("foo.Bar.baz()");
 
@@ -234,7 +234,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
resources, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler,
resources, false, mockComponentModel(), logger);
 
         event.setMethodDescription("foo.Bar.baz()");
 
@@ -273,7 +273,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
resources, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
resources, false, mockComponentModel(), logger);
 
         event.setMethodDescription(methodDescription);
 
@@ -302,7 +302,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
resources, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
resources, false, mockComponentModel(), logger);
 
         event.setMethodDescription(methodDescription);
 
@@ -324,7 +324,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
null, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
null, false, mockComponentModel(), logger);
 
         event.setMethodDescription("foo.Bar.baz()");
 
@@ -355,7 +355,7 @@ public class ComponentEventImplTest extends InternalBaseTestCase
 
         replay();
 
-        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
resources, logger);
+        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
resources, false, mockComponentModel(), logger);
 
         event.setMethodDescription("foo.Bar.baz()");
         event.storeResult(result);

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6762367c/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/ComponentPageElementImplTest.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/ComponentPageElementImplTest.java
b/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/ComponentPageElementImplTest.java
index 99feb3f..0a495e1 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/ComponentPageElementImplTest.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/ComponentPageElementImplTest.java
@@ -8,6 +8,7 @@ import org.apache.tapestry5.ioc.Location;
 import org.apache.tapestry5.ioc.services.SymbolSource;
 import org.apache.tapestry5.ioc.test.TestBase;
 import org.apache.tapestry5.model.ComponentModel;
+import org.apache.tapestry5.services.MetaDataLocator;
 import org.apache.tapestry5.services.Request;
 import org.testng.annotations.Test;
 
@@ -22,6 +23,7 @@ public class ComponentPageElementImplTest extends TestBase {
 		Location location = newMock(Location.class);
 		ComponentPageElementResources elementResources = newMock(ComponentPageElementResources.class);
 		ComponentModel model = newMock(ComponentModel.class);
+		MetaDataLocator locator = newMock(MetaDataLocator.class);
 		
 		getMocksControl().resetToNice();
 
@@ -50,16 +52,16 @@ public class ComponentPageElementImplTest extends TestBase {
 		replay();
 		ComponentPageElementImpl c;	// need to create every time because of changing symbols
 		
-		c = new ComponentPageElementImpl(page, null, "id", "nestedId", "completeid", "elementname",
instantiator, location, elementResources, request, symbolSource);
+		c = new ComponentPageElementImpl(page, null, "id", "nestedId", "completeid", "elementname",
instantiator, location, elementResources, request, symbolSource, locator);
 		assertFalse(c.isRenderTracingEnabled());
 		
-		c = new ComponentPageElementImpl(page, null, "id", "nestedId", "completeid", "elementname",
instantiator, location, elementResources, request, symbolSource);
+		c = new ComponentPageElementImpl(page, null, "id", "nestedId", "completeid", "elementname",
instantiator, location, elementResources, request, symbolSource, locator);
 		assertTrue(c.isRenderTracingEnabled());
 		
-		c = new ComponentPageElementImpl(page, null, "id", "nestedId", "completeid", "elementname",
instantiator, location, elementResources, request, symbolSource);
+		c = new ComponentPageElementImpl(page, null, "id", "nestedId", "completeid", "elementname",
instantiator, location, elementResources, request, symbolSource, locator);
 		assertTrue(c.isRenderTracingEnabled());
 		
-		c = new ComponentPageElementImpl(page, null, "id", "nestedId", "completeid", "elementname",
instantiator, location, elementResources, request, symbolSource);
+		c = new ComponentPageElementImpl(page, null, "id", "nestedId", "completeid", "elementname",
instantiator, location, elementResources, request, symbolSource, locator);
 		assertFalse(c.isRenderTracingEnabled());
 	}
 }


Mime
View raw message