Remove public modifier on JUnit5 lifecycle methods

See gh-17292
This commit is contained in:
Stephane Nicoll
2019-06-21 18:09:05 +02:00
parent c7d3b7a9f1
commit e560b7f6ba
310 changed files with 361 additions and 362 deletions

View File

@@ -61,7 +61,7 @@ class SpringBootContextLoaderMockMvcTests {
private MockMvc mvc;
@BeforeEach
public void setUp() {
void setUp() {
this.mvc = MockMvcBuilders.webAppContextSetup(this.context).build();
}

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -66,7 +66,7 @@ class JsonContentAssertTests {
private File temp;
@BeforeEach
public void setup() {
void setup() {
this.temp = new File(this.tempDir.toFile(), "file.json");
}

View File

@@ -34,7 +34,7 @@ class MockitoContextCustomizerFactoryTests {
private final MockitoContextCustomizerFactory factory = new MockitoContextCustomizerFactory();
@BeforeEach
public void setup() {
void setup() {
MockitoAnnotations.initMocks(this);
}

View File

@@ -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);
}

View File

@@ -52,7 +52,7 @@ class QualifierDefinitionTests {
private ArgumentCaptor<DependencyDescriptor> descriptorCaptor;
@BeforeEach
public void setup() {
void setup() {
MockitoAnnotations.initMocks(this);
}

View File

@@ -45,7 +45,7 @@ class SpringBootTestRandomPortEnvironmentPostProcessorTests {
private MutablePropertySources propertySources;
@BeforeEach
public void setup() {
void setup() {
this.environment = new MockEnvironment();
this.propertySources = this.environment.getPropertySources();
}

View File

@@ -41,7 +41,7 @@ class MockServerRestTemplateCustomizerTests {
private MockServerRestTemplateCustomizer customizer;
@BeforeEach
public void setup() {
void setup() {
this.customizer = new MockServerRestTemplateCustomizer();
}

View File

@@ -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);
}