| java.lang.Object | |
| ↳ | org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests |
Known Direct Subclasses
|
Abstract base test class which integrates the Spring TestContext
Framework with explicit ApplicationContext testing support in a
JUnit 4.5+ environment.
Concrete subclasses should typically declare a class-level
@ContextConfiguration annotation to
configure the application context
ContextConfiguration#locations() resource locations.
If your test does not need to load an application context, you may choose
to omit the @ContextConfiguration declaration
and to configure the appropriate
TestExecutionListeners
manually.
Note: this class serves only as a convenience for extension. If you do not
wish for your test classes to be tied to a Spring-specific class hierarchy,
you may configure your own custom test classes by using
SpringJUnit4ClassRunner, @ContextConfiguration, @TestExecutionListeners, etc.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| applicationContext | The ApplicationContext that was injected into this test instance
via setApplicationContext(ApplicationContext). |
||||||||||
| logger | Logger available to subclasses. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Set the
ApplicationContext to be used by this test instance,
provided via ApplicationContextAware semantics. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.ApplicationContextAware
| |||||||||||
The ApplicationContext that was injected into this test instance
via setApplicationContext(ApplicationContext).
Logger available to subclasses.
Set the ApplicationContext to be used by this test instance,
provided via ApplicationContextAware semantics.
| applicationContext | the ApplicationContext object to be used by this object |
|---|