This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push: new b48d94b0e Use JUnit Pioneer to avoid side effects b48d94b0e is described below commit b48d94b0e83ea4ac8418e98a9f9b18dd6879fe1f Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Dec 5 11:09:49 2024 -0500 Use JUnit Pioneer to avoid side effects --- src/test/java/org/apache/commons/lang3/StringUtilsContainsTest.java | 6 +++++- src/test/java/org/apache/commons/lang3/StringUtilsTest.java | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsContainsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsContainsTest.java index 7430a46eb..27b43da79 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsContainsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsContainsTest.java @@ -28,6 +28,8 @@ import java.util.Locale; import org.junit.jupiter.api.Test; import org.junitpioneer.jupiter.DefaultLocale; +import org.junitpioneer.jupiter.ReadsDefaultLocale; +import org.junitpioneer.jupiter.WritesDefaultLocale; /** * Tests {@link StringUtils} - Contains methods @@ -230,8 +232,10 @@ public class StringUtilsContainsTest extends AbstractLangTest { assertTrue(StringUtils.containsAnyIgnoreCase("abc", "d", "abc")); } - @DefaultLocale(language = "de", country = "DE") @Test + @DefaultLocale(language = "de", country = "DE") + @ReadsDefaultLocale + @WritesDefaultLocale public void testContainsIgnoreCase_LocaleIndependence() { final Locale[] locales = { Locale.ENGLISH, new Locale("tr"), Locale.getDefault() }; diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java index d6e436e94..9f954593b 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java @@ -51,6 +51,8 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; +import org.junitpioneer.jupiter.ReadsDefaultLocale; +import org.junitpioneer.jupiter.WritesDefaultLocale; /** * Tests for methods of {@link StringUtils} @@ -3089,6 +3091,8 @@ public class StringUtilsTest extends AbstractLangTest { } @Test + @ReadsDefaultLocale + @WritesDefaultLocale public void testToRootLowerCase() { assertNull(StringUtils.toRootLowerCase(null)); assertEquals("a", StringUtils.toRootLowerCase("A")); @@ -3109,6 +3113,8 @@ public class StringUtilsTest extends AbstractLangTest { } @Test + @ReadsDefaultLocale + @WritesDefaultLocale public void testToRootUpperCase() { assertNull(StringUtils.toRootUpperCase(null)); assertEquals("A", StringUtils.toRootUpperCase("a"));