use of com.sun.faces.mock.MockRenderKit in project mojarra by eclipse-ee4j.
the class FacesServletTestCase method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
// Set up Servlet API Objects
servletContext.addInitParameter("appParamName", "appParamValue");
servletContext.setAttribute("appScopeName", "appScopeValue");
session.setAttribute("sesScopeName", "sesScopeValue");
request.setAttribute("reqScopeName", "reqScopeValue");
UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
root.setViewId("/viewId");
facesContext.setViewRoot(root);
RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
RenderKit renderKit = new MockRenderKit();
try {
renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT, renderKit);
} catch (IllegalArgumentException e) {
}
}
Aggregations