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-net.git


The following commit(s) were added to refs/heads/master by this push:
     new a7f78419 Fill in Base64Test#testDecodeInteger()
a7f78419 is described below

commit a7f78419b04e3f1dff2edb90fecae6ee6a3ad598
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Mon May 27 08:36:42 2024 -0400

    Fill in Base64Test#testDecodeInteger()
---
 src/test/java/org/apache/commons/net/util/Base64Test.java | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/net/util/Base64Test.java 
b/src/test/java/org/apache/commons/net/util/Base64Test.java
index f8ce8f5b..a7242298 100644
--- a/src/test/java/org/apache/commons/net/util/Base64Test.java
+++ b/src/test/java/org/apache/commons/net/util/Base64Test.java
@@ -26,6 +26,7 @@ import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import java.math.BigInteger;
 import java.nio.charset.StandardCharsets;
 
 import org.junit.Ignore;
@@ -114,9 +115,14 @@ public class Base64Test {
     }
 
     @Test
-    @Ignore
     public void testDecodeInteger() {
-        fail("Not yet implemented");
+        testDecodeInteger(BigInteger.ONE);
+        testDecodeInteger(BigInteger.TEN);
+        testDecodeInteger(BigInteger.ZERO);
+    }
+
+    private void testDecodeInteger(final BigInteger bi) {
+        assertEquals(bi, 
Base64.decodeInteger(java.util.Base64.getEncoder().encode(bi.toByteArray())));
     }
 
     @Test

Reply via email to