diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/classpath/ModifiedClassPathExtensionForkParameterizedTests.java b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/classpath/ModifiedClassPathExtensionForkParameterizedTests.java index 10360fd28221..849d027ff843 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/classpath/ModifiedClassPathExtensionForkParameterizedTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/test/java/org/springframework/boot/testsupport/classpath/ModifiedClassPathExtensionForkParameterizedTests.java @@ -20,7 +20,7 @@ import java.util.List; import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.ValueSource; import static org.assertj.core.api.Assertions.assertThat; @@ -28,6 +28,7 @@ * Tests for {@link ForkedClassPath @ForkedClassPath}. * * @author Andy Wilkinson + * @author Yanming Zhou */ @ForkedClassPath class ModifiedClassPathExtensionForkParameterizedTests { @@ -35,7 +36,7 @@ class ModifiedClassPathExtensionForkParameterizedTests { private static final List arguments = new ArrayList<>(); @ParameterizedTest - @CsvSource({ "one", "two", "three" }) + @ValueSource(strings = { "one", "two", "three" }) void testIsInvokedOnceForEachArgument(String argument) { if (argument.equals("one")) { assertThat(arguments).isEmpty(); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentTests.java index db19c960f779..0346cb92d2a0 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigDataEnvironmentTests.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInfo; import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.ValueSource; import org.springframework.boot.ConfigurableBootstrapContext; import org.springframework.boot.DefaultBootstrapContext; @@ -54,6 +54,7 @@ * * @author Phillip Webb * @author Madhura Bhave + * @author Yanming Zhou */ class ConfigDataEnvironmentTests { @@ -229,7 +230,7 @@ protected ConfigDataEnvironmentContributors createContributors( } @ParameterizedTest - @CsvSource({ "include", "include[0]" }) + @ValueSource(strings = { "include", "include[0]" }) void processAndApplyWhenHasProfileIncludeInProfileSpecificDocumentThrowsException(String property, TestInfo info) { this.environment.setProperty("spring.config.location", getConfigLocation(info)); ConfigDataEnvironment configDataEnvironment = new ConfigDataEnvironment(this.logFactory, this.bootstrapContext, @@ -253,7 +254,7 @@ protected ConfigDataEnvironmentContributors createContributors( } @ParameterizedTest - @CsvSource({ "spring.profiles.include", "spring.profiles.include[0]" }) + @ValueSource(strings = { "spring.profiles.include", "spring.profiles.include[0]" }) void processAndApplyIncludesProfilesFromSpringProfilesInclude(String property, TestInfo info) { this.environment.setProperty("spring.config.location", getConfigLocation(info)); ConfigDataEnvironment configDataEnvironment = new ConfigDataEnvironment(this.logFactory, this.bootstrapContext,