/** * Setup virtual server connection to run tests inside JSF lifecycle. * The default implementation setups virtual request to the "http://localhost/test.jsf" URL and creates {@link FacesContext} instance. * Two template methods are called : * <ol> * <li>{@link #setupConnection()} to prepare request method, parameters, headers and so</li> * <li>{@link #setupView()} to create default view.</li> * </ol> * @throws Exception */ protected void setupFacesRequest() throws Exception { String url = "http://localhost/test.jsf"; setupFacesRequest(url); UIViewRoot viewRoot = setupView(); if (null != viewRoot) { facesContext.setViewRoot(viewRoot); } }
/** * Setup virtual server connection to run tests inside JSF lifecycle. * The default implementation setups virtual request to the "http://localhost/test.jsf" URL and creates {@link FacesContext} instance. * Two template methods are called : * <ol> * <li>{@link #setupConnection()} to prepare request method, parameters, headers and so</li> * <li>{@link #setupView()} to create default view.</li> * </ol> * @throws Exception */ protected void setupFacesRequest() throws Exception { String url = "http://localhost/test.jsf"; setupFacesRequest(url); UIViewRoot viewRoot = setupView(); if (null != viewRoot) { facesContext.setViewRoot(viewRoot); } }