You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/01/12 15:31:25 UTC

svn commit: r368382 - /myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java

Author: bommel
Date: Thu Jan 12 06:31:17 2006
New Revision: 368382

URL: http://svn.apache.org/viewcvs?rev=368382&view=rev
Log:
Removed MockFacesContext2 from file unneed in easymock

Modified:
    myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java

Modified: myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java?rev=368382&r1=368381&r2=368382&view=diff
==============================================================================
--- myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java (original)
+++ myfaces/commons/trunk/src/test/java/org/apache/myfaces/util/MessageUtilsTest.java Thu Jan 12 06:31:17 2006
@@ -19,12 +19,11 @@
 import java.util.ResourceBundle;
 
 import javax.faces.FactoryFinder;
-import javax.faces.render.RenderKit;
 import javax.faces.application.Application;
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.*;
-import javax.faces.context.ResponseStream;
+
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
@@ -45,7 +44,6 @@
 
     private MockResponseWriter writer;
 
-
     private static final String DEFAULT_BUNDLE = "javax.faces.Messages";
 
     /**
@@ -207,7 +205,7 @@
                                  "org.apache.myfaces.renderkit.RenderKitFactoryImpl");
 
         MockControl ctxControl = MockClassControl
-                                 .createControl(MockFacesContext2.class);
+                                 .createControl(FacesContext.class);
         FacesContext mockFacesCtx = (FacesContext) ctxControl.getMock();
 
         MockControl extCtxControl = MockClassControl
@@ -251,88 +249,4 @@
 
         return mockFacesCtx;
     }
-
-    static final class MockFacesContext2 extends FacesContext
-    {
-        public void setupGetViewRoot(UIViewRoot view) {
-            _view = view;
-        }
-
-        public void setupGetApplication(Application application) {
-            _application = application;
-        }
-
-        public Application getApplication() {
-            return _application;
-        }
-
-        public java.util.Iterator getClientIdsWithMessages() {
-            return null;
-        }
-
-        public javax.faces.context.ExternalContext getExternalContext() {
-            return null;
-        }
-
-        public javax.faces.application.FacesMessage.Severity getMaximumSeverity() {
-            return null;
-        }
-
-        public java.util.Iterator getMessages() {
-            return null;
-        }
-
-        public java.util.Iterator getMessages(String clientId) {
-            return null;
-        }
-
-        public javax.faces.render.RenderKit getRenderKit() {
-            return null;
-        }
-
-        public boolean getRenderResponse() {
-            return false;
-        }
-
-        public boolean getResponseComplete() {
-            return false;
-        }
-
-        public javax.faces.context.ResponseStream getResponseStream() {
-            return null;
-        }
-
-        public void setResponseStream(javax.faces.context.ResponseStream stream) {
-        }
-
-        public javax.faces.context.ResponseWriter getResponseWriter() {
-            return null;
-        }
-
-        public void setResponseWriter(javax.faces.context.ResponseWriter writer) {
-        }
-
-        public javax.faces.component.UIViewRoot getViewRoot() {
-            return _view;
-        }
-
-        public void setViewRoot(javax.faces.component.UIViewRoot view) {
-        }
-
-        public void addMessage(String clientId, javax.faces.application.FacesMessage message) {
-        }
-
-        public void release() {
-        }
-
-        public void renderResponse() {
-        }
-
-        public void responseComplete() {
-        }
-
-        private UIViewRoot  _view;
-        private Application _application;
-    }
 }
-