Yes you can. See [1].

JMock allows you to say:

Mock mock = createMockUIComponent();
   UIComponent child = (UIComponent) mock.proxy();

   // JavaServer Faces 1.0 Specification, section 2.2.2
   // During the apply-request-values phase,
   // only the processDecodes lifecycle method may be called.
   if (willChildrenBeProcessed(component))
     mock.expects(once()).method("processDecodes");

-Matthias

[1] 
http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-api/src/test/java/org/apache/myfaces/adf/component/UIComponentTestCase.java?revision=422050&view=markup

On 7/20/06, Sean Schofield <[EMAIL PROTECTED]> wrote:
Couldn't you just use JMock for those?

Sean

On 7/20/06, Sreedevi Aswath <[EMAIL PROTECTED]> wrote:
> Hi,
>
>    It would be great if there could be a mock up for the JSF components too.
>    That way, the unit tests for managed beans would be easier whenever there
> is  a valuebinding
>     involved.
>
> Thanks,
> Sreedevi.
>
>
>
> >
> >
>
>



--
Matthias Wessendorf

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to