Search in sources :

Example 51 with WicketTester

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

the class SessionSizeModelTest method testToleranceOnProblematicSessions.

/**
 * @see <a href="https://issues.apache.org/jira/browse/WICKET-3355">WICKET-3355</a>
 */
@Test
public void testToleranceOnProblematicSessions() {
    new WicketTester(new MockApplication() {

        @Override
        public Session newSession(final Request request, final Response response) {
            return new TestSession(request);
        }
    });
    SessionSizeModel model = new SessionSizeModel();
    assertEquals(null, model.getObject());
}
Also used : Response(org.apache.wicket.request.Response) MockApplication(org.apache.wicket.mock.MockApplication) Request(org.apache.wicket.request.Request) WicketTester(org.apache.wicket.util.tester.WicketTester) Session(org.apache.wicket.Session) WebSession(org.apache.wicket.protocol.http.WebSession) Test(org.junit.Test)

Example 52 with WicketTester

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

the class StatelessCheckerTest method setUp.

@Before
public void setUp() {
    tester = new WicketTester();
    checker = new StatelessChecker();
    checkerQuietly = new StatelessCheckerQuietly();
}
Also used : WicketTester(org.apache.wicket.util.tester.WicketTester) Before(org.junit.Before)

Example 53 with WicketTester

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

the class ResourcePageTest method setUp.

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

Example 54 with WicketTester

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

the class HomePageTest method setUp.

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

Example 55 with WicketTester

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

the class AbstractGuiIntegrationTest method initSystem.

@Override
public void initSystem(Task initTask, OperationResult initResult) throws Exception {
    logger.info("before super init");
    super.initSystem(initTask, initResult);
    logger.info("after super init");
    login(USER_ADMINISTRATOR_USERNAME);
    logger.info("user logged in");
    // cglib used by wicket unsupport java 15+ so we need use byte buddy generation for wicket
    // We can remove this after cglib(wicket) fix issue with java 15+ or when wicket will use byte buddy as default
    System.setProperty("wicket.ioc.useByteBuddy", "true");
    tester = new WicketTester(application, true);
}
Also used : WicketTester(org.apache.wicket.util.tester.WicketTester)

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