use of com.sun.ts.tests.jsf.common.resourcehandler.TCKResourceHandler in project faces by jakartaee.
the class TestServlet method applicationGetResourceHandlerTest.
// Test for Application.getResourceHandler()
public void applicationGetResourceHandlerTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
Application application = getApplication();
if (application == null) {
out.println(JSFTestUtil.APP_NULL_MSG);
return;
}
// Set a specific ResourceHandler.
TCKResourceHandler myRH = new TCKResourceHandler();
application.setResourceHandler(myRH);
if (application.getResourceHandler() == null) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL + "Unable to obtain ResourceHandler " + "instance.");
return;
}
if (!myRH.equals(application.getResourceHandler())) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL + "ResourceHandler was not able to be set!");
return;
}
out.println(JSFTestUtil.PASS);
}
use of com.sun.ts.tests.jsf.common.resourcehandler.TCKResourceHandler in project faces by jakartaee.
the class TestServlet method applicationWrapperGetResourceHandlerTest.
// Test for Application.getResourceHandler()
public void applicationWrapperGetResourceHandlerTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
ApplicationWrapper applicationWrapper = new TCKApplication();
// Set a specific ResourceHandler.
TCKResourceHandler myRH = new TCKResourceHandler();
applicationWrapper.setResourceHandler(myRH);
if (applicationWrapper.getResourceHandler() == null) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL + "Unable to obtain ResourceHandler " + "instance.");
return;
}
if (!myRH.equals(applicationWrapper.getResourceHandler())) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL + "ResourceHandler was not able to be set!");
return;
}
out.println(JSFTestUtil.PASS);
}
Aggregations