List of usage examples for org.apache.wicket.mock MockApplication getComponentInstantiationListeners
public final ComponentInstantiationListenerCollection getComponentInstantiationListeners()
From source file:org.opensingular.form.wicket.panel.SingularFormPanelTest.java
License:Apache License
@Before public void setUp() { springContext = new GenericApplicationContext(); springContext.getBeanFactory().registerSingleton("formConfig", new MockFormConfig()); springContext.getBeanFactory().registerSingleton(MyTestService.class.getName(), new MyTestService()); springContext.refresh();// w w w. j av a 2 s.c om MockApplication wicketApplication = new MockApplication(); wicketApplication.getComponentInstantiationListeners() .add(new SpringComponentInjector(wicketApplication, springContext, true)); tester = new SingularWicketTester(wicketApplication); }