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

@@ -50,7 +50,7 @@ class GrabCommandIntegrationTests {
@BeforeEach
@AfterEach
public void deleteLocalRepository() {
void deleteLocalRepository() {
System.clearProperty("grape.root");
System.clearProperty("groovy.grape.report.downloads");
}

View File

@@ -48,12 +48,12 @@ class RunCommandIntegrationTests {
private Properties systemProperties = new Properties();
@BeforeEach
public void captureSystemProperties() {
void captureSystemProperties() {
this.systemProperties.putAll(System.getProperties());
}
@AfterEach
public void restoreSystemProperties() {
void restoreSystemProperties() {
System.setProperties(this.systemProperties);
}

View File

@@ -36,7 +36,7 @@ class SpringApplicationLauncherTests {
private Map<String, String> env = new HashMap<>();
@AfterEach
public void cleanUp() {
void cleanUp() {
System.clearProperty("spring.application.class.name");
}

View File

@@ -55,13 +55,13 @@ class CommandRunnerTests {
private ClassLoader loader;
@AfterEach
public void close() {
void close() {
Thread.currentThread().setContextClassLoader(this.loader);
System.clearProperty("debug");
}
@BeforeEach
public void setup() {
void setup() {
this.loader = Thread.currentThread().getContextClassLoader();
MockitoAnnotations.initMocks(this);
this.commandRunner = new CommandRunner("spring") {

View File

@@ -45,13 +45,13 @@ class EncodePasswordCommandTests {
private ArgumentCaptor<String> message;
@BeforeEach
public void setup() {
void setup() {
MockitoAnnotations.initMocks(this);
this.log = MockLog.attach();
}
@AfterEach
public void cleanup() {
void cleanup() {
MockLog.clear();
}

View File

@@ -55,7 +55,7 @@ class InitCommandTests extends AbstractHttpClientMockTests {
private ArgumentCaptor<HttpUriRequest> requestCaptor;
@BeforeEach
public void setupMocks() {
void setupMocks() {
MockitoAnnotations.initMocks(this);
}

View File

@@ -47,7 +47,7 @@ class GroovyGrabDependencyResolverTests {
private DependencyResolver resolver;
@BeforeEach
public void setupResolver() {
void setupResolver() {
GroovyCompilerConfiguration configuration = new GroovyCompilerConfiguration() {
@Override

View File

@@ -46,13 +46,13 @@ class InstallerTests {
private Installer installer;
@BeforeEach
public void setUp() throws IOException {
void setUp() throws IOException {
System.setProperty("spring.home", this.tempDir.getAbsolutePath());
this.installer = new Installer(this.resolver);
}
@AfterEach
public void cleanUp() {
void cleanUp() {
System.clearProperty("spring.home");
}

View File

@@ -53,7 +53,7 @@ class DependencyCustomizerTests {
private DependencyCustomizer dependencyCustomizer;
@BeforeEach
public void setUp() {
void setUp() {
MockitoAnnotations.initMocks(this);
given(this.resolver.getGroupId("spring-boot-starter-logging")).willReturn("org.springframework.boot");
given(this.resolver.getArtifactId("spring-boot-starter-logging")).willReturn("spring-boot-starter-logging");

View File

@@ -82,7 +82,7 @@ final class ResolveDependencyCoordinatesTransformationTests {
this.resolutionContext);
@BeforeEach
public void setUpExpectations() {
void setUpExpectations() {
given(this.coordinatesResolver.getGroupId("spring-core")).willReturn("org.springframework");
}

View File

@@ -40,7 +40,7 @@ class CompositeDependencyManagementTests {
private DependencyManagement dependencyManagement2;
@BeforeEach
public void setup() {
void setup() {
MockitoAnnotations.initMocks(this);
}

View File

@@ -39,7 +39,7 @@ class DependencyManagementArtifactCoordinatesResolverTests {
private DependencyManagementArtifactCoordinatesResolver resolver;
@BeforeEach
public void setup() {
void setup() {
this.dependencyManagement = mock(DependencyManagement.class);
given(this.dependencyManagement.find("a1")).willReturn(new Dependency("g1", "a1", "0"));
given(this.dependencyManagement.getSpringBootVersion()).willReturn("1");

View File

@@ -48,7 +48,7 @@ final class DetailedProgressReporterTests {
private final DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
@BeforeEach
public void initialize() {
void initialize() {
new DetailedProgressReporter(this.session, this.out);
}

View File

@@ -52,7 +52,7 @@ class GrapeRootRepositorySystemSessionAutoConfigurationTests {
private RepositorySystem repositorySystem;
@BeforeEach
public void setup() {
void setup() {
MockitoAnnotations.initMocks(this);
}

View File

@@ -50,7 +50,7 @@ class SettingsXmlRepositorySystemSessionAutoConfigurationTests {
private RepositorySystem repositorySystem;
@BeforeEach
public void setup() {
void setup() {
MockitoAnnotations.initMocks(this);
}