Search in sources :

Example 1 with DummyHomePage

use of org.apache.wicket.util.tester.DummyHomePage in project wicket by apache.

the class ResponseFilterTest method addCommentFilterInAjaxResponse.

/**
 * WICKET-3620
 */
@Test
public void addCommentFilterInAjaxResponse() {
    DummyHomePage testPage = new DummyHomePage();
    testPage.getTestPageLink().add(new AjaxEventBehavior("event") {

        @Override
        protected void onEvent(AjaxRequestTarget target) {
        }
    });
    tester.startPage(testPage);
    tester.executeAjaxEvent(testPage.getTestPageLink(), "event");
    Assert.assertTrue(tester.getLastResponseAsString().contains(AppendCommentFilter.COMMENT));
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxEventBehavior(org.apache.wicket.ajax.AjaxEventBehavior) DummyHomePage(org.apache.wicket.util.tester.DummyHomePage) Test(org.junit.Test)

Aggregations

AjaxEventBehavior (org.apache.wicket.ajax.AjaxEventBehavior)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 DummyHomePage (org.apache.wicket.util.tester.DummyHomePage)1 Test (org.junit.Test)1