use of com.sun.ts.tests.jsf.common.listener.TCKSystemEventListener in project faces by jakartaee.
the class TestServlet method applicationWrapperUnsubscribeFromEventNoSrcClassTest.
// Test for Application.unsubscribeFromEvent
public void applicationWrapperUnsubscribeFromEventNoSrcClassTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
ApplicationWrapper applicationWrapper = new TCKApplication();
UIComponent uic = getApplication().createComponent(UIOutput.COMPONENT_TYPE);
SystemEvent se = new TCKSystemEvent(uic);
SystemEventListener sel = new TCKSystemEventListener();
try {
applicationWrapper.unsubscribeFromEvent(se.getClass(), sel);
out.println(JSFTestUtil.PASS);
} catch (Exception e) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL);
e.printStackTrace();
}
}
use of com.sun.ts.tests.jsf.common.listener.TCKSystemEventListener in project faces by jakartaee.
the class TestServlet method applicationWrapperSubscribeToEventTest.
// End applicationWrapperPublishEventTest2
// Test for Application.subscribeToEvent
public void applicationWrapperSubscribeToEventTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
ApplicationWrapper applicationWrapper = new TCKApplication();
UIComponent uic = getApplication().createComponent(UIOutput.COMPONENT_TYPE);
SystemEvent se = new TCKSystemEvent(uic);
SystemEventListener sel = new TCKSystemEventListener();
try {
applicationWrapper.subscribeToEvent(se.getClass(), uic.getClass(), sel);
out.println(JSFTestUtil.PASS);
} catch (Exception e) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL);
e.printStackTrace();
}
}
use of com.sun.ts.tests.jsf.common.listener.TCKSystemEventListener in project faces by jakartaee.
the class TestServlet method applicationWrapperUnsubscribeFromEventTest.
// End applicationWrapperSubscribeToEventNoSrcClassTest
// Test for Application.unsubscribeFromEvent
public void applicationWrapperUnsubscribeFromEventTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
ApplicationWrapper applicationWrapper = new TCKApplication();
UIComponent uic = getApplication().createComponent(UIOutput.COMPONENT_TYPE);
SystemEvent se = new TCKSystemEvent(uic);
SystemEventListener sel = new TCKSystemEventListener();
try {
applicationWrapper.unsubscribeFromEvent(se.getClass(), uic.getClass(), sel);
out.println(JSFTestUtil.PASS);
} catch (Exception e) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL);
e.printStackTrace();
}
}
use of com.sun.ts.tests.jsf.common.listener.TCKSystemEventListener in project faces by jakartaee.
the class TestServlet method applicationUnsubscribeFromEventTest.
// End applicationSubscribeToEventNPETest
// Test for Application.unsubscribeFromEvent
public void applicationUnsubscribeFromEventTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
Application application = getApplication();
if (application == null) {
out.println(JSFTestUtil.APP_NULL_MSG);
return;
}
UIComponent uic = application.createComponent(UIOutput.COMPONENT_TYPE);
SystemEvent se = new TCKSystemEvent(uic);
SystemEventListener sel = new TCKSystemEventListener();
try {
application.unsubscribeFromEvent(se.getClass(), uic.getClass(), sel);
out.println(JSFTestUtil.PASS);
} catch (Exception e) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL);
e.printStackTrace();
}
}
use of com.sun.ts.tests.jsf.common.listener.TCKSystemEventListener in project faces by jakartaee.
the class TestServlet method applicationSubscribeToEventNullTest.
// End applicationSubscribeToEventTest
// Test for Application.subscribeToEvent
public void applicationSubscribeToEventNullTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
Application application = getApplication();
if (application == null) {
out.println(JSFTestUtil.APP_NULL_MSG);
return;
}
UIComponent uic = application.createComponent(UIOutput.COMPONENT_TYPE);
SystemEvent se = new TCKSystemEvent(uic);
SystemEventListener sel = new TCKSystemEventListener();
try {
application.subscribeToEvent(se.getClass(), null, sel);
out.println(JSFTestUtil.PASS);
} catch (Exception e) {
out.println(JSFTestUtil.FAIL + JSFTestUtil.NL);
e.printStackTrace();
}
}
Aggregations