Remove public modifier on JUnit5 lifecycle methods
See gh-17292
This commit is contained in:
@@ -50,7 +50,7 @@ class GrabCommandIntegrationTests {
|
||||
|
||||
@BeforeEach
|
||||
@AfterEach
|
||||
public void deleteLocalRepository() {
|
||||
void deleteLocalRepository() {
|
||||
System.clearProperty("grape.root");
|
||||
System.clearProperty("groovy.grape.report.downloads");
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class InitCommandTests extends AbstractHttpClientMockTests {
|
||||
private ArgumentCaptor<HttpUriRequest> requestCaptor;
|
||||
|
||||
@BeforeEach
|
||||
public void setupMocks() {
|
||||
void setupMocks() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class GroovyGrabDependencyResolverTests {
|
||||
private DependencyResolver resolver;
|
||||
|
||||
@BeforeEach
|
||||
public void setupResolver() {
|
||||
void setupResolver() {
|
||||
GroovyCompilerConfiguration configuration = new GroovyCompilerConfiguration() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -82,7 +82,7 @@ final class ResolveDependencyCoordinatesTransformationTests {
|
||||
this.resolutionContext);
|
||||
|
||||
@BeforeEach
|
||||
public void setUpExpectations() {
|
||||
void setUpExpectations() {
|
||||
given(this.coordinatesResolver.getGroupId("spring-core")).willReturn("org.springframework");
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class CompositeDependencyManagementTests {
|
||||
private DependencyManagement dependencyManagement2;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class GrapeRootRepositorySystemSessionAutoConfigurationTests {
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class SettingsXmlRepositorySystemSessionAutoConfigurationTests {
|
||||
private RepositorySystem repositorySystem;
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user