You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2007/10/24 20:14:37 UTC

svn commit: r587949 - /myfaces/core/branches/1_2_1/api/src/test/java/javax/faces/component/UIComponentEncodeAllTest.java

Author: mmarinschek
Date: Wed Oct 24 11:14:36 2007
New Revision: 587949

URL: http://svn.apache.org/viewvc?rev=587949&view=rev
Log:
changed test to work with optimization

Modified:
    myfaces/core/branches/1_2_1/api/src/test/java/javax/faces/component/UIComponentEncodeAllTest.java

Modified: myfaces/core/branches/1_2_1/api/src/test/java/javax/faces/component/UIComponentEncodeAllTest.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/1_2_1/api/src/test/java/javax/faces/component/UIComponentEncodeAllTest.java?rev=587949&r1=587948&r2=587949&view=diff
==============================================================================
--- myfaces/core/branches/1_2_1/api/src/test/java/javax/faces/component/UIComponentEncodeAllTest.java (original)
+++ myfaces/core/branches/1_2_1/api/src/test/java/javax/faces/component/UIComponentEncodeAllTest.java Wed Oct 24 11:14:36 2007
@@ -32,6 +32,7 @@
         mockedMethods.add(clazz.getDeclaredMethod("getRendersChildren", null));
         mockedMethods.add(clazz.getDeclaredMethod("encodeChildren", new Class[] { FacesContext.class }));
         mockedMethods.add(clazz.getDeclaredMethod("getChildren", null));
+        mockedMethods.add(clazz.getDeclaredMethod("getChildCount", null));
         mockedMethods.add(clazz.getDeclaredMethod("encodeEnd", new Class[] { FacesContext.class }));
 
         _testimpl = _mocksControl.createMock(clazz, mockedMethods.toArray(new Method[mockedMethods.size()]));
@@ -82,6 +83,7 @@
         List<UIComponent> childs = new ArrayList<UIComponent>();
         UIComponent testChild = _mocksControl.createMock(UIComponent.class);
         childs.add(testChild);
+        EasyMock.expect(_testimpl.getChildCount()).andReturn(childs.size());        
         EasyMock.expect(_testimpl.getChildren()).andReturn(childs);
         testChild.encodeAll(EasyMock.same(_facesContext));