Search in sources :

Example 56 with WicketTester

use of org.apache.wicket.util.tester.WicketTester in project the-app by devops-dojo.

the class AbstractWicketTest method initializeWicketTester.

@Before
public void initializeWicketTester() throws Exception {
    initMocks(this);
    ApplicationContextMock appctx = initializeApplicationContext();
    TestShopApplication application = new TestShopApplication(appctx);
    wicketTester = new WicketTester(application);
}
Also used : ApplicationContextMock(org.apache.wicket.spring.test.ApplicationContextMock) TestShopApplication(io.github.zutherb.appstash.shop.ui.application.TestShopApplication) WicketTester(org.apache.wicket.util.tester.WicketTester) Before(org.junit.Before)

Example 57 with WicketTester

use of org.apache.wicket.util.tester.WicketTester in project sandbox by irof.

the class ListPanelTest method setUp.

@Before
public void setUp() {
    tester = new WicketTester(new WicketApplication());
    tester.startComponentInPage(ListPanel.class);
}
Also used : WicketTester(org.apache.wicket.util.tester.WicketTester) WicketApplication(sandbox.WicketApplication) Before(org.junit.Before)

Example 58 with WicketTester

use of org.apache.wicket.util.tester.WicketTester in project sandbox by irof.

the class ButtonPanelTest method setup.

@Before
public void setup() {
    tester = new WicketTester(new WicketApplication());
    tester.startComponentInPage(ButtonPanel.class);
}
Also used : WicketTester(org.apache.wicket.util.tester.WicketTester) WicketApplication(sandbox.WicketApplication) Before(org.junit.Before)

Example 59 with WicketTester

use of org.apache.wicket.util.tester.WicketTester in project sandbox by irof.

the class MiscPageTest method setup.

@Before
public void setup() {
    tester = new WicketTester(new WicketApplication());
    tester.startPage(MiscPage.class);
}
Also used : WicketTester(org.apache.wicket.util.tester.WicketTester) WicketApplication(sandbox.WicketApplication) Before(org.junit.Before)

Example 60 with WicketTester

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

the class MoreSpecificResourceMountPathTest method can_use_resource_mounted_with_parameter.

@Test
public void can_use_resource_mounted_with_parameter() {
    WicketTester browser = new WicketTester(new WicketApplication());
    browser.executeUrl(WicketApplication.urlFor(1L));
    Assert.assertThat(browser.getLastResponseAsString(), is(equalTo("1")));
}
Also used : WicketTester(org.apache.wicket.util.tester.WicketTester) Test(org.junit.Test)

Aggregations

WicketTester (org.apache.wicket.util.tester.WicketTester)89 Test (org.junit.Test)54 Before (org.junit.Before)26 FormTester (org.apache.wicket.util.tester.FormTester)14 WebApplication (org.apache.wicket.protocol.http.WebApplication)9 MockApplication (org.apache.wicket.mock.MockApplication)6 AbstractDeploymentTest (org.apache.wicket.arquillian.testing.deployment.AbstractDeploymentTest)5 PageParameters (org.apache.wicket.request.mapper.parameter.PageParameters)5 IPageManagerProvider (org.apache.wicket.IPageManagerProvider)4 IPageManagerContext (org.apache.wicket.page.IPageManagerContext)4 DummyApplication (org.apache.wicket.resource.DummyApplication)4 Component (org.apache.wicket.Component)3 Response (org.apache.wicket.request.Response)3 WicketApplication (sandbox.WicketApplication)3 TestWicketJavaEEApplication (org.apache.wicket.arquillian.testing.TestWicketJavaEEApplication)2 IAuthorizationStrategy (org.apache.wicket.authorization.IAuthorizationStrategy)2 RoleAuthorizationStrategy (org.apache.wicket.authroles.authorization.strategies.role.RoleAuthorizationStrategy)2 MockPageManager (org.apache.wicket.mock.MockPageManager)2 IManageablePage (org.apache.wicket.page.IManageablePage)2 IPageManager (org.apache.wicket.page.IPageManager)2