Remove public modifier on JUnit5 lifecycle methods
See gh-17292
This commit is contained in:
@@ -61,7 +61,7 @@ class SpringBootContextLoaderMockMvcTests {
|
||||
private MockMvc mvc;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
void setUp() {
|
||||
this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class ApplicationContextAssertProviderTests {
|
||||
private Supplier<ApplicationContext> startupFailureSupplier;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
this.startupFailure = new RuntimeException();
|
||||
this.mockContextSupplier = () -> this.mockContext;
|
||||
|
||||
@@ -47,14 +47,14 @@ class ApplicationContextAssertTests {
|
||||
private RuntimeException failure = new RuntimeException();
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.parent = new StaticApplicationContext();
|
||||
this.context = new StaticApplicationContext();
|
||||
this.context.setParent(this.parent);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void cleanup() {
|
||||
void cleanup() {
|
||||
this.context.close();
|
||||
this.parent.close();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class GsonTesterIntegrationTests {
|
||||
private static final String JSON = "{\"name\":\"Spring\",\"age\":123}";
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.gson = new Gson();
|
||||
GsonTester.initFields(this, this.gson);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class JacksonTesterIntegrationTests {
|
||||
private static final String JSON = "{\"name\":\"Spring\",\"age\":123}";
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.objectMapper = new ObjectMapper();
|
||||
JacksonTester.initFields(this, this.objectMapper);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class JsonContentAssertTests {
|
||||
private File temp;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.temp = new File(this.tempDir.toFile(), "file.json");
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class MockitoContextCustomizerFactoryTests {
|
||||
private final MockitoContextCustomizerFactory factory = new MockitoContextCustomizerFactory();
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class MockitoTestExecutionListenerTests {
|
||||
private ArgumentCaptor<Field> fieldCaptor;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
given(this.applicationContext.getBean(MockitoPostProcessor.class)).willReturn(this.postProcessor);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class QualifierDefinitionTests {
|
||||
private ArgumentCaptor<DependencyDescriptor> descriptorCaptor;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class SpringBootTestRandomPortEnvironmentPostProcessorTests {
|
||||
private MutablePropertySources propertySources;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.environment = new MockEnvironment();
|
||||
this.propertySources = this.environment.getPropertySources();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class MockServerRestTemplateCustomizerTests {
|
||||
private MockServerRestTemplateCustomizer customizer;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.customizer = new MockServerRestTemplateCustomizer();
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class RootUriRequestExpectationManagerTests {
|
||||
private ArgumentCaptor<ClientHttpRequest> requestCaptor;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
this.manager = new RootUriRequestExpectationManager(this.uri, this.delegate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user