Hi,
      I am trying to user the shale test framework to test model updates.
Now the code is like this but it doesn't work. Does anyone know how the code
should be ?

        UIViewRoot root = facesContext.getViewRoot();
        assertNotNull(root);
        UIComponent form1 = this.createForm("form1", root);
        HtmlInputText component = createInputText("pin", form1);
        ValueBinding valueBinding = facesContext.getApplication().
                                                createValueBinding( 
"pin.currentPin");
        component.setValueBinding( "value", valueBinding );
        component.setSubmittedValue("blue");
        facesContext.
                getExternalContext().
                        getRequestMap().
                                put( "pin", new Pin());
        facesContext.
                getExternalContext().
                        getRequestParameterMap().
                                put( "form1:currentPin", "blue" );
        Pin pin = ( Pin )facesContext.
                                        getApplication().
                                                getVariableResolver().
                                                        
resolveVariable(facesContext, "pin" );
        assertNotNull( pin.getCurrentPin() );


Thanks,
Mohan

-- 
View this message in context: 
http://www.nabble.com/Shale-test-framework---Update-model-bean-tf4607288.html#a13155918
Sent from the Shale - User mailing list archive at Nabble.com.

Reply via email to