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);
}
Aggregations