Example usage for org.apache.wicket.mock MockApplication getComponentInstantiationListeners

List of usage examples for org.apache.wicket.mock MockApplication getComponentInstantiationListeners

Introduction

In this page you can find the example usage for org.apache.wicket.mock MockApplication getComponentInstantiationListeners.

Prototype

public final ComponentInstantiationListenerCollection getComponentInstantiationListeners() 

Source Link

Usage

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);
}