This is an automated email from the ASF dual-hosted git repository.

thiagohp pushed a commit to branch javax
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git


The following commit(s) were added to refs/heads/javax by this push:
     new 796890113 TAP5-2792: fixing test failures
796890113 is described below

commit 796890113efdbe991a6c7ff1727a47e0d2e0581f
Author: Thiago H. de Paula Figueiredo <thi...@arsmachina.com.br>
AuthorDate: Sat Oct 26 09:21:37 2024 -0300

    TAP5-2792: fixing test failures
---
 .../src/main/java/org/apache/tapestry5/test/TapestryTestCase.java | 5 +++++
 .../internal/services/ComponentEventLinkEncoderImplTest.java      | 8 ++++++++
 2 files changed, 13 insertions(+)

diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java 
b/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
index cb53579c5..c1ff0a19c 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
@@ -552,6 +552,11 @@ public abstract class TapestryTestCase extends IOCTestCase
         expect(request.getPath()).andReturn(path).atLeastOnce();
     }
 
+    protected final void train_getMethod(Request request, String method)
+    {
+        expect(request.getMethod()).andReturn(method).atLeastOnce();
+    }
+
     protected final void train_getPersistentFieldNames(ComponentModel model, 
String... names)
     {
         
expect(model.getPersistentFieldNames()).andReturn(Arrays.asList(names)).atLeastOnce();
diff --git 
a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
 
b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
index 5a809c97c..6fdc33876 100644
--- 
a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
+++ 
b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
@@ -230,6 +230,8 @@ public class ComponentEventLinkEncoderImplTest extends 
InternalBaseTestCase
         MetaDataLocator metaDataLocator = neverWhitelistProtected();
 
         train_getPath(request, "/foo/bar");
+        
+        train_getMethod(request, "GET");
 
         train_setLocaleFromLocaleName(ls, "foo", false);
 
@@ -276,6 +278,8 @@ public class ComponentEventLinkEncoderImplTest extends 
InternalBaseTestCase
 
         String path = "/foo/Bar" + (finalSlash ? "/" : "");
         train_getPath(request, path);
+        
+        train_getMethod(request, "GET");
 
         train_setLocaleFromLocaleName(ls, "foo", false);
 
@@ -309,6 +313,8 @@ public class ComponentEventLinkEncoderImplTest extends 
InternalBaseTestCase
         String path = "/foo/Bar";
 
         train_getPath(request, path);
+        
+        train_getMethod(request, "GET");
 
         train_setLocaleFromLocaleName(ls, "foo", false);
 
@@ -389,6 +395,8 @@ public class ComponentEventLinkEncoderImplTest extends 
InternalBaseTestCase
 
         String path = "/foo/Bar/zip/zoom" + (finalSlash ? "/" : "");
         train_getPath(request, path);
+        
+        train_getMethod(request, "GET");
 
         train_setLocaleFromLocaleName(ls, "foo", false);
 

Reply via email to