Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish access modifiers for test classes #27736

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* @author Andy Wilkinson
*/
public class ArtifactoryRepositoryTests {
class ArtifactoryRepositoryTests {

@Test
void whenProjectVersionIsMilestoneThenRepositoryIsMilestone() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
*
* @author Andy Wilkinson
*/
public class BomPluginIntegrationTests {
class BomPluginIntegrationTests {

private File projectDir;

private File buildFile;

@BeforeEach
public void setup(@TempDir File projectDir) throws IOException {
void setup(@TempDir File projectDir) throws IOException {
this.projectDir = projectDir;
this.buildFile = new File(this.projectDir, "build.gradle");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Andy Wilkinson
*/
public class ArtifactVersionDependencyVersionTests {
class ArtifactVersionDependencyVersionTests {

@Test
void parseWhenVersionIsNotAMavenVersionShouldReturnNull() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Andy Wilkinson
*/
public class CalendarVersionDependencyVersionTests {
class CalendarVersionDependencyVersionTests {

@Test
void parseWhenVersionIsNotACalendarVersionShouldReturnNull() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Andy Wilkinson
*/
public class DependencyVersionTests {
class DependencyVersionTests {

@Test
void parseWhenValidMavenVersionShouldReturnArtifactVersionDependencyVersion() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Andy Wilkinson
*/
public class NumericQualifierDependencyVersionTests {
class NumericQualifierDependencyVersionTests {

@Test
void isNewerThanOnVersionWithNumericQualifierWhenInputHasNoQualifierShouldReturnTrue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Andy Wilkinson
*/
public class ReleaseTrainDependencyVersionTests {
class ReleaseTrainDependencyVersionTests {

@Test
void parsingOfANonReleaseTrainVersionReturnsNull() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Brian Clozel
*/
public class CompoundRowTests {
class CompoundRowTests {

private static final String NEWLINE = System.lineSeparator();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Brian Clozel
*/
public class SingleRowTests {
class SingleRowTests {

private static final String NEWLINE = System.lineSeparator();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Brian Clozel
*/
public class TableTests {
class TableTests {

private static final String NEWLINE = System.lineSeparator();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*
* @author Andy Wilkinson
*/
public class ReproduciblePluginsDatActionTests {
class ReproduciblePluginsDatActionTests {

@Test
void postProcessingOrdersCategoriesAndPlugins() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @author Andy Wilkinson
* @author Mike Smithson
*/
public class PluginXmlParserTests {
class PluginXmlParserTests {

private final PluginXmlParser parser = new PluginXmlParser();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
*
* @author Andy Wilkinson
*/
public class OptionalDependenciesPluginIntegrationTests {
class OptionalDependenciesPluginIntegrationTests {

private File projectDir;

private File buildFile;

@BeforeEach
public void setup(@TempDir File projectDir) throws IOException {
void setup(@TempDir File projectDir) throws IOException {
this.projectDir = projectDir;
this.buildFile = new File(this.projectDir, "build.gradle");
}
Expand Down Expand Up @@ -80,7 +80,7 @@ void optionalDependenciesAreAddedToTestSourceSetsRuntimeClasspath() throws IOExc
optionalDependenciesAreAddedToSourceSetClasspath("test", "runtimeClasspath");
}

public void optionalDependenciesAreAddedToSourceSetClasspath(String sourceSet, String classpath)
private void optionalDependenciesAreAddedToSourceSetClasspath(String sourceSet, String classpath)
throws IOException {
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
out.println("plugins {");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*
* @author Andy Wilkinson
*/
public class DefaultWebMvcTagsProviderTests {
class DefaultWebMvcTagsProviderTests {

@Test
void whenTagsAreProvidedThenDefaultTagsArePresent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Andy Wilkinson
*/
public class OutcomeTests {
class OutcomeTests {

@Test
void outcomeForInformationalStatusIsInformational() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*
* @author Andy Wilkinson
*/
public class DefaultWebFluxTagsProviderTests {
class DefaultWebFluxTagsProviderTests {

@Test
void whenTagsAreProvidedThenDefaultTagsArePresent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @author Oliver Gierke
*/
@SuppressWarnings("resource")
public class AutoConfigurationPackagesTests {
class AutoConfigurationPackagesTests {

@Test
void setAndGet() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* @author Andy Wilkinson
*/
public class LifecycleAutoConfigurationTests {
class LifecycleAutoConfigurationTests {

private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(LifecycleAutoConfiguration.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* @author Brian Clozel
*/
@Testcontainers(disabledWithoutDocker = true)
public class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
class ReactiveElasticsearchRepositoriesAutoConfigurationTests {

@Container
static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* @author Brian Clozel
*/
@Testcontainers(disabledWithoutDocker = true)
public class ReactiveElasticsearchRestClientAutoConfigurationTests {
class ReactiveElasticsearchRestClientAutoConfigurationTests {

@Container
static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* @author Stephane Nicoll
* @author Michael J. Simons
*/
public class Neo4jReactiveRepositoriesAutoConfigurationTests {
class Neo4jReactiveRepositoriesAutoConfigurationTests {

private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withUserConfiguration(MockedDriverConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
@SpringBootTest
@Testcontainers(disabledWithoutDocker = true)
public class Neo4jRepositoriesAutoConfigurationIntegrationTests {
class Neo4jRepositoriesAutoConfigurationIntegrationTests {

@Container
private static final Neo4jContainer<?> neo4jServer = new Neo4jContainer<>(DockerImageNames.neo4j())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @author Kazuki Shimizu
*/
@ExtendWith(OutputCaptureExtension.class)
public class FreeMarkerAutoConfigurationTests {
class FreeMarkerAutoConfigurationTests {

private final BuildOutput buildOutput = new BuildOutput(getClass());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
package org.springframework.boot.autoconfigure.packagestest.two;

import org.springframework.boot.autoconfigure.AutoConfigurationPackage;
import org.springframework.boot.autoconfigure.AutoConfigurationPackagesTests;
import org.springframework.context.annotation.Configuration;

/**
* Sample configuration used in {@link AutoConfigurationPackagesTests}.
* Sample configuration used in {@code AutoConfigurationPackagesTests}.
*
* @author Oliver Gierke
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*
* @author Andy Wilkinson
*/
public class SqlInitializationAutoConfigurationTests {
class SqlInitializationAutoConfigurationTests {

private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(SqlInitializationAutoConfiguration.class)).withPropertyValues(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.springframework.boot.web.server.LocalServerPort;

@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class MyWebIntegrationTests {
class MyWebIntegrationTests {

@LocalServerPort
int port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author Daniil Razorenov
*/
@WebServiceServerTest(endpoints = ExampleWebServiceEndpoint.class)
public class WebServiceServerIntegrationTests {
class WebServiceServerIntegrationTests {

@Autowired
private MockWebServiceClient mock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author Daniil Razorenov
*/
@WebServiceServerTest(properties = "spring.profiles.active=test")
public class WebServiceServerPropertiesIntegrationTests {
class WebServiceServerPropertiesIntegrationTests {

@Autowired
private Environment environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* @author Daniil Razorenov
*/
public class WebServiceServerTypeExcludeFilterTests {
class WebServiceServerTypeExcludeFilterTests {

private final MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@SpringBootTest
@ActiveProfiles({ "test1", "test2" })
@ContextConfiguration(loader = SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests.Loader.class)
public class SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests {
class SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests {

@Autowired
private Environment environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
@SpringBootTest
@ActiveProfiles({ "test1", "test2" })
@ContextConfiguration(loader = SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests.Loader.class)
public class SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests {
class SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests {

@Autowired
private Environment environment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @author Andy Wilkinson
*/
@ExtendWith(SpringExtension.class)
public class SpyBeanWithJdkProxyTests {
class SpyBeanWithJdkProxyTests {

@Autowired
private ExampleService service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @author Andy Wilkinson
*/
@ClassPathExclusions({ "reactor-netty*.jar", "jetty-client*.jar" })
public class WebTestClientContextCustomizerWithoutSupportedHttpClientTests {
class WebTestClientContextCustomizerWithoutSupportedHttpClientTests {

@Test
void createContextCustomizerWhenNoSupportedHttpClientIsAvailableShouldReturnNull() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* @author Stephane Nicoll
*/
@ClassPathExclusions("spring-webflux*.jar")
public class WebTestClientContextCustomizerWithoutWebfluxIntegrationTests {
class WebTestClientContextCustomizerWithoutWebfluxIntegrationTests {

@Test
void customizerIsNotCreatedWithoutWebClient() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* @author Scott Frederick
* @author Jeroen Meijer
*/
public class BuildRequestTests {
class BuildRequestTests {

@TempDir
File tempDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @author Wei Jiang
* @author Scott Frederick
*/
public class DockerConfigurationTests {
class DockerConfigurationTests {

@Test
void createDockerConfigurationWithDefaults() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
@GradleCompatibility
@Testcontainers(disabledWithoutDocker = true)
@Disabled("Disabled until differences between running locally and in CI can be diagnosed")
public class BootBuildImageRegistryIntegrationTests {
class BootBuildImageRegistryIntegrationTests {

@Container
static final RegistryContainer registry = new RegistryContainer().withStartupAttempts(5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @author Wei Jiang
* @author Scott Frederick
*/
public class DockerSpecTests {
class DockerSpecTests {

@Test
void asDockerConfigurationWithDefaults() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @author Andy Wilkinson
*/
@ExtendWith(MavenBuildExtension.class)
public class BuildInfoIntegrationTests {
class BuildInfoIntegrationTests {

@TestTemplate
void buildInfoPropertiesAreGenerated(MavenBuild mavenBuild) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* @author Phillip Webb
*/
public class EclipseM2eIntegrationTests {
class EclipseM2eIntegrationTests {

@Test // gh-21992
void pluginPomIncludesOptionalShadeDependency() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* @author Madhura Bhave
* @author Scott Frederick
*/
public class CustomLayersProviderTests {
class CustomLayersProviderTests {

private CustomLayersProvider customLayersProvider;

Expand Down
Loading