Search in sources :

Example 1 with SpringContextLocatorMock

use of org.apache.wicket.spring.test.SpringContextLocatorMock in project wicket by apache.

the class SpringBeanLocatorTest method testContextNotFound.

/**
 * tests error when context not found
 */
@Test
public void testContextNotFound() {
    SpringContextLocatorMock ctxLocator = new SpringContextLocatorMock(null);
    SpringBeanLocator locator = new SpringBeanLocator(Bean.class, ctxLocator);
    try {
        locator.locateProxyTarget();
    } catch (IllegalStateException e) {
    // noop
    }
}
Also used : SpringContextLocatorMock(org.apache.wicket.spring.test.SpringContextLocatorMock) Test(org.junit.Test)

Example 2 with SpringContextLocatorMock

use of org.apache.wicket.spring.test.SpringContextLocatorMock in project wicket by apache.

the class SpringBeanLocatorTest method before.

/**
 */
@Before
public void before() {
    ctx = new ApplicationContextMock();
    ctxLocator = new SpringContextLocatorMock(ctx);
}
Also used : ApplicationContextMock(org.apache.wicket.spring.test.ApplicationContextMock) SpringContextLocatorMock(org.apache.wicket.spring.test.SpringContextLocatorMock) Before(org.junit.Before)

Aggregations

SpringContextLocatorMock (org.apache.wicket.spring.test.SpringContextLocatorMock)2 ApplicationContextMock (org.apache.wicket.spring.test.ApplicationContextMock)1 Before (org.junit.Before)1 Test (org.junit.Test)1