Polish access modifiers for test classes

See gh-27736
pull/28061/head
izeye 3 years ago committed by Andy Wilkinson
parent 2baee89971
commit 8a425dedfd

@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class ArtifactoryRepositoryTests {
class ArtifactoryRepositoryTests {
@Test
void whenProjectVersionIsMilestoneThenRepositoryIsMilestone() {

@ -38,14 +38,14 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @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");
}

@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class ArtifactVersionDependencyVersionTests {
class ArtifactVersionDependencyVersionTests {
@Test
void parseWhenVersionIsNotAMavenVersionShouldReturnNull() {

@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class CalendarVersionDependencyVersionTests {
class CalendarVersionDependencyVersionTests {
@Test
void parseWhenVersionIsNotACalendarVersionShouldReturnNull() {

@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class DependencyVersionTests {
class DependencyVersionTests {
@Test
void parseWhenValidMavenVersionShouldReturnArtifactVersionDependencyVersion() {

@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class NumericQualifierDependencyVersionTests {
class NumericQualifierDependencyVersionTests {
@Test
void isNewerThanOnVersionWithNumericQualifierWhenInputHasNoQualifierShouldReturnTrue() {

@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class ReleaseTrainDependencyVersionTests {
class ReleaseTrainDependencyVersionTests {
@Test
void parsingOfANonReleaseTrainVersionReturnsNull() {

@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class ReproduciblePluginsDatActionTests {
class ReproduciblePluginsDatActionTests {
@Test
void postProcessingOrdersCategoriesAndPlugins() throws IOException {

@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
* @author Andy Wilkinson
* @author Mike Smithson
*/
public class PluginXmlParserTests {
class PluginXmlParserTests {
private final PluginXmlParser parser = new PluginXmlParser();

@ -34,14 +34,14 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @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");
}
@ -80,7 +80,7 @@ public class OptionalDependenciesPluginIntegrationTests {
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 {");

@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class DefaultWebMvcTagsProviderTests {
class DefaultWebMvcTagsProviderTests {
@Test
void whenTagsAreProvidedThenDefaultTagsArePresent() {

@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class OutcomeTests {
class OutcomeTests {
@Test
void outcomeForInformationalStatusIsInformational() {

@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class DefaultWebFluxTagsProviderTests {
class DefaultWebFluxTagsProviderTests {
@Test
void whenTagsAreProvidedThenDefaultTagsArePresent() {

@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
* @author Oliver Gierke
*/
@SuppressWarnings("resource")
public class AutoConfigurationPackagesTests {
class AutoConfigurationPackagesTests {
@Test
void setAndGet() {

@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Andy Wilkinson
*/
public class LifecycleAutoConfigurationTests {
class LifecycleAutoConfigurationTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(LifecycleAutoConfiguration.class));

@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Brian Clozel
*/
@Testcontainers(disabledWithoutDocker = true)
public class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
@Container
static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())

@ -45,7 +45,7 @@ import static org.mockito.Mockito.mock;
* @author Brian Clozel
*/
@Testcontainers(disabledWithoutDocker = true)
public class ReactiveElasticsearchRestClientAutoConfigurationTests {
class ReactiveElasticsearchRestClientAutoConfigurationTests {
@Container
static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())

@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll
* @author Michael J. Simons
*/
public class Neo4jReactiveRepositoriesAutoConfigurationTests {
class Neo4jReactiveRepositoriesAutoConfigurationTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withUserConfiguration(MockedDriverConfiguration.class)

@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@SpringBootTest
@Testcontainers(disabledWithoutDocker = true)
public class Neo4jRepositoriesAutoConfigurationIntegrationTests {
class Neo4jRepositoriesAutoConfigurationIntegrationTests {
@Container
private static final Neo4jContainer<?> neo4jServer = new Neo4jContainer<>(DockerImageNames.neo4j())

@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Kazuki Shimizu
*/
@ExtendWith(OutputCaptureExtension.class)
public class FreeMarkerAutoConfigurationTests {
class FreeMarkerAutoConfigurationTests {
private final BuildOutput buildOutput = new BuildOutput(getClass());

@ -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
*/

@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest
@ActiveProfiles({ "test1", "test2" })
@ContextConfiguration(loader = SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests.Loader.class)
public class SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests {
class SpringBootTestWithActiveProfilesAndEnvironmentPropertyTests {
@Autowired
private Environment environment;

@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest
@ActiveProfiles({ "test1", "test2" })
@ContextConfiguration(loader = SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests.Loader.class)
public class SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests {
class SpringBootTestWithActiveProfilesAndSystemEnvironmentPropertyTests {
@Autowired
private Environment environment;

@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Andy Wilkinson
*/
@ClassPathExclusions({ "reactor-netty*.jar", "jetty-client*.jar" })
public class WebTestClientContextCustomizerWithoutSupportedHttpClientTests {
class WebTestClientContextCustomizerWithoutSupportedHttpClientTests {
@Test
void createContextCustomizerWhenNoSupportedHttpClientIsAvailableShouldReturnNull() {

@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll
*/
@ClassPathExclusions("spring-webflux*.jar")
public class WebTestClientContextCustomizerWithoutWebfluxIntegrationTests {
class WebTestClientContextCustomizerWithoutWebfluxIntegrationTests {
@Test
void customizerIsNotCreatedWithoutWebClient() {

@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.entry;
* @author Phillip Webb
* @author Scott Frederick
*/
public class BuildRequestTests {
class BuildRequestTests {
@TempDir
File tempDir;

@ -26,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Wei Jiang
* @author Scott Frederick
*/
public class DockerConfigurationTests {
class DockerConfigurationTests {
@Test
void createDockerConfigurationWithDefaults() {

@ -49,7 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@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)

@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
* @author Wei Jiang
* @author Scott Frederick
*/
public class DockerSpecTests {
class DockerSpecTests {
@Test
void asDockerConfigurationWithDefaults() {

@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Andy Wilkinson
*/
@ExtendWith(MavenBuildExtension.class)
public class BuildInfoIntegrationTests {
class BuildInfoIntegrationTests {
@TestTemplate
void buildInfoPropertiesAreGenerated(MavenBuild mavenBuild) {

@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*
* @author Phillip Webb
*/
public class EclipseM2eIntegrationTests {
class EclipseM2eIntegrationTests {
@Test // gh-21992
void pluginPomIncludesOptionalShadeDependency() throws Exception {

@ -40,7 +40,7 @@ import static org.mockito.Mockito.mock;
* @author Madhura Bhave
* @author Scott Frederick
*/
public class CustomLayersProviderTests {
class CustomLayersProviderTests {
private CustomLayersProvider customLayersProvider;

@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
* @author Wei Jiang
* @author Scott Frederick
*/
public class DockerTests {
class DockerTests {
@Test
void asDockerConfigurationWithDefaults() {

@ -37,7 +37,7 @@ import static org.mockito.Mockito.mock;
* @author Madhura Bhave
* @author Phillip Webb
*/
public class ConfigTreeConfigDataLoaderTests {
class ConfigTreeConfigDataLoaderTests {
private ConfigTreeConfigDataLoader loader = new ConfigTreeConfigDataLoader();

@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException
* @author Madhura Bhave
* @author Phillip Webb
*/
public class ConfigTreeConfigDataResourceTests {
class ConfigTreeConfigDataResourceTests {
@Test
void constructorWhenPathStringIsNullThrowsException() {

@ -34,7 +34,7 @@ import static org.mockito.Mockito.mock;
* @author Madhura Bhave
* @author Phillip Webb
*/
public class StandardConfigDataLoaderTests {
class StandardConfigDataLoaderTests {
private StandardConfigDataLoader loader = new StandardConfigDataLoader();

@ -44,7 +44,7 @@ import static org.mockito.Mockito.mock;
* @author Madhura Bhave
* @author Phillip Webb
*/
public class StandardConfigDataLocationResolverTests {
class StandardConfigDataLocationResolverTests {
private StandardConfigDataLocationResolver resolver;

@ -31,7 +31,7 @@ import static org.mockito.Mockito.mock;
* @author Madhura Bhave
* @author Phillip Webb
*/
public class StandardConfigDataResourceTests {
class StandardConfigDataResourceTests {
StandardConfigDataReference reference = mock(StandardConfigDataReference.class);

@ -41,7 +41,7 @@ import static org.mockito.Mockito.verify;
* @author Madhura Bhave
*/
@ExtendWith(MockitoExtension.class)
public class BoundPropertiesTrackingBindHandlerTests {
class BoundPropertiesTrackingBindHandlerTests {
private List<ConfigurationPropertySource> sources = new ArrayList<>();

@ -43,7 +43,7 @@ import static org.mockito.Mockito.mock;
* @author Ilya Lukyanovich
* @author Phillip Webb
*/
public class RestTemplateBuilderClientHttpRequestInitializerTests {
class RestTemplateBuilderClientHttpRequestInitializerTests {
private final MockClientHttpRequest request = new MockClientHttpRequest();

@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock;
*
* @author Phillip Webb
*/
public class WebServerApplicationContextTests {
class WebServerApplicationContextTests {
@Test
void hasServerNamespaceWhenContextIsNotWebServerApplicationContextReturnsFalse() {

@ -31,7 +31,7 @@ import org.springframework.security.rsocket.metadata.UsernamePasswordMetadata;
import org.springframework.util.MimeTypeUtils;
@SpringBootTest(properties = "spring.rsocket.server.port=0")
public class SampleRSocketApplicationTests {
class SampleRSocketApplicationTests {
@LocalRSocketServerPort
private int port;

Loading…
Cancel
Save