myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [myfaces-test] 13/21: small fixes (add _processingEvents and redirect getMimeType)
Date Thu, 03 May 2018 18:26:00 GMT
This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1_0_0_alpha
in repository https://gitbox.apache.org/repos/asf/myfaces-test.git

commit 5bf67ba5745027143865cfdccd140943449dec23
Author: Leonardo Uribe <lu4242@apache.org>
AuthorDate: Thu Sep 3 19:31:07 2009 +0000

    small fixes (add _processingEvents and redirect getMimeType)
---
 .../org/apache/shale/test/mock/MockExternalContext.java     |  4 ++--
 .../org/apache/shale/test/mock/MockExternalContext20.java   |  6 ++++++
 .../java/org/apache/shale/test/mock/MockFacesContext20.java | 13 +++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java b/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java
index 7ac79f3..b2fd650 100644
--- a/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java
+++ b/test12/src/main/java/org/apache/shale/test/mock/MockExternalContext.java
@@ -76,7 +76,7 @@ public class MockExternalContext extends ExternalContext {
 
 
     private Map applicationMap = null;
-    private ServletContext context = null;
+    protected ServletContext context = null;
     protected HttpServletRequest request = null;
     private Map requestMap = null;
     protected HttpServletResponse response = null;
@@ -366,7 +366,7 @@ public class MockExternalContext extends ExternalContext {
     /** {@inheritDoc} */
     public Set getResourcePaths(String path) {
 
-        throw new UnsupportedOperationException();
+        return context.getResourcePaths(path);
 
     }
 
diff --git a/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java b/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java
index 523440c..a5b691d 100644
--- a/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java
+++ b/test20/src/main/java/org/apache/shale/test/mock/MockExternalContext20.java
@@ -32,6 +32,12 @@ public class MockExternalContext20 extends MockExternalContext12
         super(context, request, response);
     }
 
+    @Override
+    public String getMimeType(String file)
+    {
+        return context.getMimeType(file);
+    }
+
     // ------------------------------------------------------ Instance Variables
 
     // ----------------------------------------------------- Mock Object Methods
diff --git a/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java b/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java
index e2bb5ff..b873dc8 100644
--- a/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java
+++ b/test20/src/main/java/org/apache/shale/test/mock/MockFacesContext20.java
@@ -31,6 +31,8 @@ public class MockFacesContext20 extends MockFacesContext12 {
 
     // ------------------------------------------------------------ Constructors
 
+    private boolean _processingEvents = true;
+    
     public MockFacesContext20() {
         super();
         setCurrentInstance(this);
@@ -104,6 +106,17 @@ public class MockFacesContext20 extends MockFacesContext12 {
         return _partialViewContext;
     }
     
+    public boolean isProcessingEvents()
+    {
+        return _processingEvents;
+    }
+    
+    @Override
+    public void setProcessingEvents(boolean processingEvents)
+    {
+        _processingEvents = processingEvents;
+    }
+    
     // ------------------------------------------------- ExternalContext Methods
 
 }

-- 
To stop receiving notification emails like this one, please contact
deki@apache.org.

Mime
View raw message