Rename ApplicationContextTester -> Runner
Rename `ApplicationContextTester` and related classes to `ApplicationContextRunner` and refactor existing tests to use correctly named variables. See gh-9875
This commit is contained in:
@@ -34,15 +34,15 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
/**
|
||||
* Abstract tests for {@link AbstractApplicationContextTester} implementations.
|
||||
* Abstract tests for {@link AbstractApplicationContextRunner} implementations.
|
||||
*
|
||||
* @param <T> The tester type
|
||||
* @param <T> The runner type
|
||||
* @param <C> the context type
|
||||
* @param <A> the assertable context type
|
||||
* @author Stephane Nicoll
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public abstract class AbstractApplicationContextTesterTests<T extends AbstractApplicationContextTester<T, C, A>, C extends ConfigurableApplicationContext, A extends AssertProviderApplicationContext<C>> {
|
||||
public abstract class AbstractApplicationContextRunnerTests<T extends AbstractApplicationContextRunner<T, C, A>, C extends ConfigurableApplicationContext, A extends AssertProviderApplicationContext<C>> {
|
||||
|
||||
@Rule
|
||||
public final ExpectedException thrown = ExpectedException.none();
|
||||
@@ -19,17 +19,17 @@ package org.springframework.boot.test.context;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
/**
|
||||
* Tests for {@link ApplicationContextTester}.
|
||||
* Tests for {@link ApplicationContextRunner}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public class ApplicationContextTesterTests extends
|
||||
AbstractApplicationContextTesterTests<ApplicationContextTester, ConfigurableApplicationContext, AssertableApplicationContext> {
|
||||
public class ApplicationContextRunnerTests extends
|
||||
AbstractApplicationContextRunnerTests<ApplicationContextRunner, ConfigurableApplicationContext, AssertableApplicationContext> {
|
||||
|
||||
@Override
|
||||
protected ApplicationContextTester get() {
|
||||
return new ApplicationContextTester();
|
||||
protected ApplicationContextRunner get() {
|
||||
return new ApplicationContextRunner();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,17 +19,17 @@ package org.springframework.boot.test.context;
|
||||
import org.springframework.boot.web.reactive.context.ConfigurableReactiveWebApplicationContext;
|
||||
|
||||
/**
|
||||
* Tests for {@link ReactiveWebApplicationContextTester}.
|
||||
* Tests for {@link ReactiveWebApplicationContextRunner}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public class ReactiveWebApplicationContextTesterTests extends
|
||||
AbstractApplicationContextTesterTests<ReactiveWebApplicationContextTester, ConfigurableReactiveWebApplicationContext, AssertableReactiveWebApplicationContext> {
|
||||
public class ReactiveWebApplicationContextRunnerTests extends
|
||||
AbstractApplicationContextRunnerTests<ReactiveWebApplicationContextRunner, ConfigurableReactiveWebApplicationContext, AssertableReactiveWebApplicationContext> {
|
||||
|
||||
@Override
|
||||
protected ReactiveWebApplicationContextTester get() {
|
||||
return new ReactiveWebApplicationContextTester();
|
||||
protected ReactiveWebApplicationContextRunner get() {
|
||||
return new ReactiveWebApplicationContextRunner();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,13 +24,13 @@ import org.springframework.web.context.ConfigurableWebApplicationContext;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link WebApplicationContextTester}.
|
||||
* Tests for {@link WebApplicationContextRunner}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
public class WebApplicationContextTesterTests extends
|
||||
AbstractApplicationContextTesterTests<WebApplicationContextTester, ConfigurableWebApplicationContext, AssertableWebApplicationContext> {
|
||||
public class WebApplicationContextRunnerTests extends
|
||||
AbstractApplicationContextRunnerTests<WebApplicationContextRunner, ConfigurableWebApplicationContext, AssertableWebApplicationContext> {
|
||||
|
||||
@Test
|
||||
public void contextShouldHaveMockServletContext() throws Exception {
|
||||
@@ -39,8 +39,8 @@ public class WebApplicationContextTesterTests extends
|
||||
}
|
||||
|
||||
@Override
|
||||
protected WebApplicationContextTester get() {
|
||||
return new WebApplicationContextTester();
|
||||
protected WebApplicationContextRunner get() {
|
||||
return new WebApplicationContextRunner();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user