Search in sources :

Example 1 with TestSystemEventListener

use of com.sun.ts.tests.jsf.api.jakarta_faces.event.common.TestSystemEventListener in project faces by jakartaee.

the class TestServlet method preRemoveFromViewEventIsApproiateListenerPostiveTest.

// ------------------------------------------------------------
// PreRemoveFromViewEvent Tests
public void preRemoveFromViewEventIsApproiateListenerPostiveTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    PrintWriter pw = response.getWriter();
    SystemEventListener testListener = new TestSystemEventListener();
    ComponentSystemEvent cse = createEvent(getTestComponent());
    String eventName = cse.getClass().getName();
    if (cse.isAppropriateListener(testListener)) {
        pw.println(JSFTestUtil.PASS);
    } else {
        pw.println("Test FAILED. " + eventName + ".isAppropriateListener " + "did not return true when SystemEventListener was passed in " + "as a parameter");
    }
}
Also used : TestSystemEventListener(com.sun.ts.tests.jsf.api.jakarta_faces.event.common.TestSystemEventListener) SystemEventListener(jakarta.faces.event.SystemEventListener) ComponentSystemEvent(jakarta.faces.event.ComponentSystemEvent) PrintWriter(java.io.PrintWriter) TestSystemEventListener(com.sun.ts.tests.jsf.api.jakarta_faces.event.common.TestSystemEventListener)

Example 2 with TestSystemEventListener

use of com.sun.ts.tests.jsf.api.jakarta_faces.event.common.TestSystemEventListener in project faces by jakartaee.

the class TestServlet method postAddToViewEventIsApproiateListenerPostiveTest.

// ------------------------------------------------------------
// PostAddToViewEvent Tests
public void postAddToViewEventIsApproiateListenerPostiveTest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    PrintWriter pw = response.getWriter();
    SystemEventListener testListener = new TestSystemEventListener();
    ComponentSystemEvent cse = createEvent(getTestComponent());
    String eventName = cse.getClass().getName();
    if (cse.isAppropriateListener(testListener)) {
        pw.println(JSFTestUtil.PASS);
    } else {
        pw.println("Test FAILED. " + eventName + ".isAppropriateListener " + "did not return true when SystemEventListener was passed in " + "as a parameter");
    }
}
Also used : TestSystemEventListener(com.sun.ts.tests.jsf.api.jakarta_faces.event.common.TestSystemEventListener) SystemEventListener(jakarta.faces.event.SystemEventListener) ComponentSystemEvent(jakarta.faces.event.ComponentSystemEvent) PrintWriter(java.io.PrintWriter) TestSystemEventListener(com.sun.ts.tests.jsf.api.jakarta_faces.event.common.TestSystemEventListener)

Aggregations

TestSystemEventListener (com.sun.ts.tests.jsf.api.jakarta_faces.event.common.TestSystemEventListener)2 ComponentSystemEvent (jakarta.faces.event.ComponentSystemEvent)2 SystemEventListener (jakarta.faces.event.SystemEventListener)2 PrintWriter (java.io.PrintWriter)2