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

commit 5c93f1f8da788f37c2d1904ddaf6aad14c5a0bc5
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed Dec 13 15:51:36 2023 -0500

    Migrate to JUnit 5 #186
---
 src/changes/changes.xml                            |  1 +
 .../org/apache/commons/mail/AbstractEmailTest.java |  3 +--
 .../org/apache/commons/mail/HtmlEmailTest.java     | 22 ++++++++++------------
 .../apache/commons/mail/ImageHtmlEmailTest.java    |  1 -
 4 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 4ddac7d..53e89df 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -37,6 +37,7 @@
       <action type="fix" dev="ggregory" due-to="Gary Gregory">Avoid possible 
NullPointerException in DataSourceClassPathResolver.resolve(String, 
boolean).</action>
       <action type="fix" dev="ggregory" due-to="Gary Gregory">Complete 
half-baked test 
DataSourceUrlResolverTest.testResolvingHttpNonLenient().</action>
       <action issue="EMAIL-206" type="fix" dev="ggregory" due-to="Lee Jaeheon, 
Gary Gregory">Use SharedByteArrayInputStream for memory usage #157.</action>
+      <action dev="ggregory" type="fix" due-to="Loki-Afro, Gary 
Gregory">Migrate to JUnit 5 #186.</action>
       <!-- ADD -->
       <action type="add" due-to="Dependabot" dev="ggregory">Add 
github/codeql-action #75.</action>
       <action type="add" due-to="Gary Gregory" dev="ggregory">Add Maven plugin 
JapiCmp and remove Clirr.</action>
diff --git a/src/test/java/org/apache/commons/mail/AbstractEmailTest.java 
b/src/test/java/org/apache/commons/mail/AbstractEmailTest.java
index 74f2a49..1c80785 100644
--- a/src/test/java/org/apache/commons/mail/AbstractEmailTest.java
+++ b/src/test/java/org/apache/commons/mail/AbstractEmailTest.java
@@ -299,8 +299,7 @@ public abstract class AbstractEmailTest {
         final WiserMessage emailMessage = this.validateSend(mailServer, 
strSubject, fromAdd, toAdd, ccAdd, bccAdd, true);
 
         // test message content
-        assertTrue(getMessageBody(emailMessage).contains(strMessage),
-                "didn't find expected message content in message body");
+        assertTrue(getMessageBody(emailMessage).contains(strMessage), "didn't 
find expected message content in message body");
     }
 
     /**
diff --git a/src/test/java/org/apache/commons/mail/HtmlEmailTest.java 
b/src/test/java/org/apache/commons/mail/HtmlEmailTest.java
index 7ebaee4..f1db6df 100644
--- a/src/test/java/org/apache/commons/mail/HtmlEmailTest.java
+++ b/src/test/java/org/apache/commons/mail/HtmlEmailTest.java
@@ -157,8 +157,7 @@ public class HtmlEmailTest extends AbstractEmailTest {
 
         // if we embed the same file again, do we get the same content ID
         // back?
-        final String testCid =
-            this.email.embed(file);
+        final String testCid = this.email.embed(file);
         assertEquals(strEmbed, testCid, "didn't get same CID after embedding 
same file twice");
 
         // if we embed a new file, is the content ID unique?
@@ -354,8 +353,7 @@ public class HtmlEmailTest extends AbstractEmailTest {
 
     @Test
     @Disabled
-    public void testSendWithDefaultCharset() throws Exception
-    {
+    public void testSendWithDefaultCharset() throws Exception {
         // Test is disabled as its result is dependent on the execution order:
         // the mail.mime.charset property is normally cached by the MimeUtility
         // class, thus setting it to another value while running the tests
@@ -509,15 +507,15 @@ public class HtmlEmailTest extends AbstractEmailTest {
         final String testCid = "Test CID";
         final String encodedCid = EmailUtils.encodeUrl(testCid);
 
-         // if we embed a new file, do we get the content ID we specified back?
-         final String strEmbed = this.email.embed(file, testCid);
-         assertNotNull(strEmbed);
-         assertEquals(encodedCid, strEmbed, "didn't get same CID when 
embedding with a specified CID");
+        // if we embed a new file, do we get the content ID we specified back?
+        final String strEmbed = this.email.embed(file, testCid);
+        assertNotNull(strEmbed);
+        assertEquals(encodedCid, strEmbed, "didn't get same CID when embedding 
with a specified CID");
 
-         // if we embed the same file again, do we get the same content ID
-         // back?
-         final String returnedCid = this.email.embed(file);
-         assertEquals(encodedCid, returnedCid, "didn't get same CID after 
embedding same file twice");
+        // if we embed the same file again, do we get the same content ID
+        // back?
+        final String returnedCid = this.email.embed(file);
+        assertEquals(encodedCid, returnedCid, "didn't get same CID after 
embedding same file twice");
     }
 
     @Test
diff --git a/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java 
b/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
index 409a2a6..5cb81fd 100644
--- a/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
+++ b/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.mail;
 
-
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.mail.resolver.DataSourceClassPathResolver;

Reply via email to