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-codec.git
commit 283358d57ef2fac0bbc2d609a6a21ba5187a4a24 Author: Gary D. Gregory <[email protected]> AuthorDate: Sun Oct 12 15:59:05 2025 -0400 Use @ParameterizedTest --- .../apache/commons/codec/binary/Base64Test.java | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/test/java/org/apache/commons/codec/binary/Base64Test.java b/src/test/java/org/apache/commons/codec/binary/Base64Test.java index 7335c119..4eadd137 100644 --- a/src/test/java/org/apache/commons/codec/binary/Base64Test.java +++ b/src/test/java/org/apache/commons/codec/binary/Base64Test.java @@ -41,6 +41,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; +import org.junit.jupiter.params.provider.ValueSource; /** * Tests {@link Base64}. @@ -893,15 +894,20 @@ class Base64Test { * @see <a href="https://tools.ietf.org/html/rfc4648">https://tools.ietf.org/ * html/rfc4648</a> */ - @Test - void testRfc4648Section10DecodeEncode() { - testDecodeEncode(""); - testDecodeEncode("Zg=="); - testDecodeEncode("Zm8="); - testDecodeEncode("Zm9v"); - testDecodeEncode("Zm9vYg=="); - testDecodeEncode("Zm9vYmE="); - testDecodeEncode("Zm9vYmFy"); + @ParameterizedTest + // @formatter:off + @ValueSource(strings = { + "", + "Zg==", + "Zm8=", + "Zm9v", + "Zm9vYg==", + "Zm9vYmE=", + "Zm9vYmFy" + }) + // @formatter:on + void testRfc4648Section10DecodeEncode(final String input) { + testDecodeEncode(input); } /**
