Hi!
And it works for me too.

On Sun, 2006-01-15 at 22:28 +0100, Arvid Hülsebus wrote:
I just updated the sources and run a 'mvn clean install' and everything
worked out fine. The tests didn't fail.
All this is odd. I tried it now on another machine and got the same test failure.
I also tried a completely new checkout.

But now I know whats the problem is: The mock tests were trained to see a getValue(null) but instead the component issued a getValue(instance-of-mock-context).
The following patch fixed it for me:

Index: /home/im/projects/myfaces/api/api/src/test/java/javax/faces/component/UIComponentBaseTest.java
===================================================================
--- /home/im/projects/myfaces/api/api/src/test/java/javax/faces/component/UIComponentBaseTest.java (revision 369368) +++ /home/im/projects/myfaces/api/api/src/test/java/javax/faces/component/UIComponentBaseTest.java (working copy)
@@ -62,7 +62,7 @@
  public void testIsRenderedBinding() {
MockControl bindingControl = MockClassControl.createControl(ValueBinding.class);
    ValueBinding mockBinding = (ValueBinding)bindingControl.getMock();
-    mockBinding.getValue(null);
+    mockBinding.getValue(FacesContext.getCurrentInstance());
    bindingControl.setReturnValue(Boolean.FALSE);
    bindingControl.replay();
    mock.setValueBinding("rendered", mockBinding);
@@ -375,7 +375,7 @@
  public void testSetRendererTypeStringBinding() {
MockControl bindingControl = MockClassControl.createControl(ValueBinding.class);
    ValueBinding mockBinding = (ValueBinding)bindingControl.getMock();
-    mockBinding.getValue(null);
+    mockBinding.getValue(FacesContext.getCurrentInstance());
    String whumpy = "Whumpy";
    bindingControl.setReturnValue(whumpy);
    bindingControl.replay();

But why did this work on your machines without this patch?

Ciao,
Mario

Reply via email to