Polishing
This commit is contained in:
@@ -42,7 +42,7 @@ import java.lang.annotation.Target;
|
||||
* the one for the child context (i.e., the lowest context in the hierarchy).
|
||||
*
|
||||
* <pre class="code">
|
||||
* @RunWith(SpringJUnit4ClassRunner.class)
|
||||
* @RunWith(SpringRunner.class)
|
||||
* @WebAppConfiguration
|
||||
* @ContextHierarchy({
|
||||
* @ContextConfiguration(classes = TestAppConfig.class),
|
||||
@@ -71,7 +71,7 @@ import java.lang.annotation.Target;
|
||||
* the parent context for each of the contexts loaded for the concrete subclasses.
|
||||
*
|
||||
* <pre class="code">
|
||||
* @RunWith(SpringJUnit4ClassRunner.class)
|
||||
* @RunWith(SpringRunner.class)
|
||||
* @WebAppConfiguration
|
||||
* @ContextConfiguration("file:src/main/webapp/WEB-INF/applicationContext.xml")
|
||||
* public abstract class AbstractWebTests {}
|
||||
@@ -98,7 +98,7 @@ import java.lang.annotation.Target;
|
||||
* "/order-config.xml"}</code>.
|
||||
*
|
||||
* <pre class="code">
|
||||
* @RunWith(SpringJUnit4ClassRunner.class)
|
||||
* @RunWith(SpringRunner.class)
|
||||
* @ContextHierarchy({
|
||||
* @ContextConfiguration(name = "parent", locations = "/app-config.xml"),
|
||||
* @ContextConfiguration(name = "child", locations = "/user-config.xml")
|
||||
@@ -119,7 +119,7 @@ import java.lang.annotation.Target;
|
||||
* context loaded from {@code "/app-config.xml"}.
|
||||
*
|
||||
* <pre class="code">
|
||||
* @RunWith(SpringJUnit4ClassRunner.class)
|
||||
* @RunWith(SpringRunner.class)
|
||||
* @ContextHierarchy({
|
||||
* @ContextConfiguration(name = "parent", locations = "/app-config.xml"),
|
||||
* @ContextConfiguration(name = "child", locations = "/user-config.xml")
|
||||
|
||||
@@ -45,7 +45,7 @@ public class WebTestContextBootstrapper extends DefaultTestContextBootstrapper {
|
||||
*/
|
||||
@Override
|
||||
protected Class<? extends ContextLoader> getDefaultContextLoaderClass(Class<?> testClass) {
|
||||
if (AnnotatedElementUtils.findMergedAnnotation(testClass, WebAppConfiguration.class) != null) {
|
||||
if (AnnotatedElementUtils.hasAnnotation(testClass, WebAppConfiguration.class)) {
|
||||
return WebDelegatingSmartContextLoader.class;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user