You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mb...@apache.org on 2007/03/19 20:45:58 UTC

svn commit: r520068 - /myfaces/core/branches/jsf12/impl/src/test/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupportTest.java

Author: mbr
Date: Mon Mar 19 12:45:57 2007
New Revision: 520068

URL: http://svn.apache.org/viewvc?view=rev&rev=520068
Log:
modified test to comply MYFACES-1224

Modified:
    myfaces/core/branches/jsf12/impl/src/test/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupportTest.java

Modified: myfaces/core/branches/jsf12/impl/src/test/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupportTest.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/impl/src/test/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupportTest.java?view=diff&rev=520068&r1=520067&r2=520068
==============================================================================
--- myfaces/core/branches/jsf12/impl/src/test/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupportTest.java (original)
+++ myfaces/core/branches/jsf12/impl/src/test/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupportTest.java Mon Mar 19 12:45:57 2007
@@ -54,13 +54,18 @@
      */
     public void testProcessComponentBinding()
     {
-        expect(_facesContext.getELContext()).andReturn(_elContext).anyTimes();
         UIComponent root = _mocksControl.createMock(UIComponent.class);
-        expect(root.getValueExpression(eq("binding"))).andReturn(null);
         UIComponent testcomponent = _mocksControl.createMock(UIComponent.class);
-        expect(root.getFacetsAndChildren()).andReturn(Arrays.asList(new UIComponent[] { testcomponent }).iterator());
+        ValueExpression rootExpression = _mocksControl.createMock(ValueExpression.class);
         ValueExpression testExpression = _mocksControl.createMock(ValueExpression.class);
+        
+        _mocksControl.checkOrder(true);
+        expect(root.getValueExpression(eq("binding"))).andReturn(rootExpression);
+        expect(_facesContext.getELContext()).andReturn(_elContext);
+        rootExpression.setValue(same(_elContext), same(root));
+        expect(root.getFacetsAndChildren()).andReturn(Arrays.asList(new UIComponent[] { testcomponent }).iterator());
         expect(testcomponent.getValueExpression(eq("binding"))).andReturn(testExpression);
+        expect(_facesContext.getELContext()).andReturn(_elContext);
         testExpression.setValue(same(_elContext), same(testcomponent));
         expect(testcomponent.getFacetsAndChildren()).andReturn(Collections.EMPTY_LIST.iterator());