public abstract class AbstractJUnitApplicationContextInitializingTest extends Object
BeanApplicationContext
. The ApplicationContext is
available through either the getApplicationContext()
method or the protected member appContext.< br />
This class can be used to create tests, but one should seriously consider using the ContextJUnit4ClassRunner
with JUnit @RunWith
annotation.Modifier and Type | Field and Description |
---|---|
protected ApplicationContext |
appContext
The application context, initialized on
@Before |
Constructor and Description |
---|
AbstractJUnitApplicationContextInitializingTest() |
Modifier and Type | Method and Description |
---|---|
ApplicationContext |
getApplicationContext()
Returns the application context, you could also use the protected member
appContext . |
BeanFactory |
getNewBeanFactory()
To set a custom
BeanFactory override this method. |
void |
init()
Initializes a
BeanApplicationContext . |
protected ApplicationContext appContext
@Before
public AbstractJUnitApplicationContextInitializingTest()
public final void init()
BeanApplicationContext
.public BeanFactory getNewBeanFactory()
BeanFactory
override this method.DefaultBeanFactory
public ApplicationContext getApplicationContext()
appContext
.Copyright © 2012 redlab.be. All Rights Reserved.