Search in sources :

Example 1 with TCKClientBehaviorContext

use of com.sun.ts.tests.jsf.api.jakarta_faces.component.behavior.common.TCKClientBehaviorContext in project faces by jakartaee.

the class TestServlet method createClientBehaviorContextNPETest.

// --------------------------------------- test methods
// createClientBehaviorContext() throws NullPointerException
public void createClientBehaviorContextNPETest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    PrintWriter out = response.getWriter();
    ClientBehaviorContext cbc = new TCKClientBehaviorContext();
    HashSet<ClientBehaviorContext.Parameter> params = new HashSet<ClientBehaviorContext.Parameter>();
    ClientBehaviorContext.Parameter paramOne = new ClientBehaviorContext.Parameter("one", "alpha");
    params.add(paramOne);
    // context as null
    JSFTestUtil.checkForNPE(cbc, "createClientBehaviorContext", new Class<?>[] { FacesContext.class, UIComponent.class, String.class, String.class, Collection.class }, new Object[] { null, new UIInput(), "abc", "xyz", params }, out);
    // component as null
    JSFTestUtil.checkForNPE(cbc, "createClientBehaviorContext", new Class<?>[] { FacesContext.class, UIComponent.class, String.class, String.class, Collection.class }, new Object[] { getFacesContext(), null, "abc", "xyz", params }, out);
    // eventName as null
    JSFTestUtil.checkForNPE(cbc, "createClientBehaviorContext", new Class<?>[] { FacesContext.class, UIComponent.class, String.class, String.class, Collection.class }, new Object[] { getFacesContext(), new UIInput(), null, "xyz", params }, out);
}
Also used : UIInput(jakarta.faces.component.UIInput) ClientBehaviorContext(jakarta.faces.component.behavior.ClientBehaviorContext) TCKClientBehaviorContext(com.sun.ts.tests.jsf.api.jakarta_faces.component.behavior.common.TCKClientBehaviorContext) TCKClientBehaviorContext(com.sun.ts.tests.jsf.api.jakarta_faces.component.behavior.common.TCKClientBehaviorContext) PrintWriter(java.io.PrintWriter) HashSet(java.util.HashSet)

Aggregations

TCKClientBehaviorContext (com.sun.ts.tests.jsf.api.jakarta_faces.component.behavior.common.TCKClientBehaviorContext)1 UIInput (jakarta.faces.component.UIInput)1 ClientBehaviorContext (jakarta.faces.component.behavior.ClientBehaviorContext)1 PrintWriter (java.io.PrintWriter)1 HashSet (java.util.HashSet)1