use of org.apache.wicket.spring.test.ApplicationContextMock in project wicket by apache.
the class AnnotatedFieldInBehaviorPage method before.
/**
* @throws Exception
*/
@Before
public void before() throws Exception {
tester = new WicketTester();
ctx = new ApplicationContextMock();
SpringComponentInjector springInjector = new SpringComponentInjector(tester.getApplication(), ctx);
tester.getApplication().getComponentInstantiationListeners().add(springInjector);
}
use of org.apache.wicket.spring.test.ApplicationContextMock in project the-app by devops-dojo.
the class AbstractWicketTest method initializeApplicationContext.
private ApplicationContextMock initializeApplicationContext() {
Navigation navigationMock = createNavigationMock();
when(navigationProvider.getNavigation()).thenReturn(navigationMock);
ApplicationContextMock appctx = new ApplicationContextMock();
appctx.putBean("authenticationService", authenticationService);
appctx.putBean("cart", cart);
appctx.putBean("checkout", checkout);
appctx.putBean("productRepository", productRepository);
appctx.putBean("productService", productService);
appctx.putBean("frequentlyBoughtWithProductsRecommendationService", recommendationService);
appctx.putBean("restTemplate", restTemplate);
appctx.putBean("fakeAuthenticationService", fakeAuthenticationService);
appctx.putBean("navigationProvider", navigationProvider);
appctx.putBean("userService", userService);
appctx.putBean("featureTooglesBean", featureTooglesBean);
appctx.putBean("designSelector", designSelectorBean);
appctx.putBean("dozerMapper", createDozerMapper());
return appctx;
}
Aggregations