use of org.apache.wicket.util.tester.WicketTester in project wicket by apache.
the class WebSocketTesterProcessorTest method before.
@Before
public void before() {
tester = new WicketTester(application);
application.getWicketFilter().setFilterPath("");
}
use of org.apache.wicket.util.tester.WicketTester in project wicket by apache.
the class WebSocketTesterRequestCycleListenerTest method before.
@Before
public void before() {
tester = new WicketTester();
tester.getApplication().getRequestCycleListeners().add(new IRequestCycleListener() {
@Override
public void onBeginRequest(RequestCycle cycle) {
beginRequestCalled.set(true);
}
@Override
public void onEndRequest(RequestCycle cycle) {
endRequestCalled.set(true);
}
@Override
public void onDetach(RequestCycle cycle) {
detachCalled.set(true);
}
});
}
use of org.apache.wicket.util.tester.WicketTester in project wicket by apache.
the class SpringBeanWithGenericsTest method before.
/**
* @throws Exception
*/
@Before
public void before() throws Exception {
tester = new WicketTester();
ctx = new AnnotationConfigApplicationContext();
ctx.register(ConfigContextWithGenerics.class);
ctx.refresh();
SpringComponentInjector springInjector = new SpringComponentInjector(tester.getApplication(), ctx);
tester.getApplication().getComponentInstantiationListeners().add(springInjector);
}
use of org.apache.wicket.util.tester.WicketTester in project wicket by apache.
the class CdiConfigurationTest method testApplicationLevelConfiguration.
@Test
public void testApplicationLevelConfiguration() {
WicketTester tester = new WicketTester();
CdiConfiguration config = new CdiConfiguration();
for (ConversationPropagation cp : ConversationPropagation.values()) {
config.setPropagation(cp);
assertEquals(cp, config.getPropagation());
}
config.configure(tester.getApplication());
}
use of org.apache.wicket.util.tester.WicketTester in project wicket by apache.
the class EnclosureTest method testRenderPage13.
/**
* @throws Exception
*/
@Test
public void testRenderPage13() throws Exception {
tester = new WicketTester(new MockApplication() {
@Override
protected void init() {
super.init();
// This should cause all SecuredContainer components to be hidden
getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy.AllowAllAuthorizationStrategy() {
@Override
public boolean isActionAuthorized(Component component, Action action) {
return !(component instanceof SecuredContainer_13);
}
});
}
});
executeTest(EnclosurePage_13.class, "EnclosurePageExpectedResult_13.html");
}
Aggregations