This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git

commit 9f85d52e5809d701c999760119c1b05421f1a63f
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Tue Nov 17 02:11:05 2026 +0000

    Use JUnit 5 assertions and Mockito best practices in tests
---
 .../test/java/org/apache/maven/doxia/markup/HtmlTagTest.java   |  2 +-
 .../org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java    |  4 ++--
 .../apache/maven/doxia/module/markdown/MarkdownParserTest.java |  8 ++++----
 .../apache/maven/doxia/module/markdown/MarkdownSinkTest.java   | 10 +++++-----
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git 
a/doxia-core/src/test/java/org/apache/maven/doxia/markup/HtmlTagTest.java 
b/doxia-core/src/test/java/org/apache/maven/doxia/markup/HtmlTagTest.java
index a7828d7e..56c1dc65 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/markup/HtmlTagTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/markup/HtmlTagTest.java
@@ -41,7 +41,7 @@ class HtmlTagTest {
      * does today. A tag whose block value moves changes the whitespace of 
every generated site.
      */
     @Test
-    void knownTagsAnswerAsHtmlMarkupDoes() throws IllegalAccessException {
+    void knownTagsAnswerAsHtmlMarkupDoes() throws Exception {
         List<Field> tagFields = new ArrayList<>();
 
         for (Field field : HtmlMarkup.class.getDeclaredFields()) {
diff --git 
a/doxia-core/src/test/java/org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java
 
b/doxia-core/src/test/java/org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java
index a23437df..16273d16 100644
--- 
a/doxia-core/src/test/java/org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java
+++ 
b/doxia-core/src/test/java/org/apache/maven/doxia/parser/Xhtml5BaseParserTest.java
@@ -392,7 +392,7 @@ class Xhtml5BaseParserTest extends AbstractParserTest {
     }
 
     @Test
-    void whitespaceInBlockAndInlineElements() throws ParseException {
+    void whitespaceInBlockAndInlineElements() throws Exception {
         String text =
                 "<p>\n  \n<ul>" + Xhtml5BaseParser.EOL + "  <li><a 
href=\"https://example.com\";> One</a> Another</li>"
                         + Xhtml5BaseParser.EOL + "  <li> Two   Another </li>   
"
@@ -923,7 +923,7 @@ class Xhtml5BaseParserTest extends AbstractParserTest {
     }
 
     @Test
-    void anchorWithName() throws ParseException {
+    void anchorWithName() throws Exception {
         String text = "<a name=\"test\"></a>";
 
         parser.parse(text, sink);
diff --git 
a/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java
 
b/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java
index 587d2c93..5d7a434a 100644
--- 
a/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java
+++ 
b/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java
@@ -880,7 +880,7 @@ class MarkdownParserTest extends AbstractParserTest {
     }
 
     @Test
-    void anchorWithName() throws ParseException {
+    void anchorWithName() throws Exception {
         Iterator<SinkEventElement> eventIterator = 
parseSourceToEventTestingSink("<a name=\"my-anchor\">test</a>")
                 .getEventList()
                 .iterator();
@@ -890,7 +890,7 @@ class MarkdownParserTest extends AbstractParserTest {
     }
 
     @Test
-    void strikeThrough() throws ParseException {
+    void strikeThrough() throws Exception {
         Iterator<SinkEventElement> eventIterator = 
parseSourceToEventTestingSink("~~strikethrough~~")
                 .getEventList()
                 .iterator();
@@ -903,7 +903,7 @@ class MarkdownParserTest extends AbstractParserTest {
     }
 
     @Test
-    void relativeLinkWithAnchorInvalidDoxiaId() throws ParseException {
+    void relativeLinkWithAnchorInvalidDoxiaId() throws Exception {
         Iterator<SinkEventElement> eventIterator = 
parseSourceToEventTestingSink("[Test URL](test.html#anchor\\(\\))")
                 .getEventList()
                 .iterator();
@@ -916,7 +916,7 @@ class MarkdownParserTest extends AbstractParserTest {
     }
 
     @Test
-    void relativeLinkWithAnchorInvalidDoxiaIdAndRelExternal() throws 
ParseException {
+    void relativeLinkWithAnchorInvalidDoxiaIdAndRelExternal() throws Exception 
{
         Iterator<SinkEventElement> eventIterator = 
parseSourceToEventTestingSink(
                         "<a href=\"test.html#anchor()\" rel=\"external\">Test 
URL</a>")
                 .getEventList()
diff --git 
a/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownSinkTest.java
 
b/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownSinkTest.java
index 5ca6c819..35569b6d 100644
--- 
a/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownSinkTest.java
+++ 
b/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownSinkTest.java
@@ -688,7 +688,7 @@ class MarkdownSinkTest extends AbstractSinkTest {
     }
 
     @Test
-    void tableWithInsignificantNewLines() throws ParseException, IOException {
+    void tableWithInsignificantNewLines() throws Exception {
         try (Sink sink = getSink()) {
             parseFile(htmlParser, "table", "html", sink);
         }
@@ -706,7 +706,7 @@ class MarkdownSinkTest extends AbstractSinkTest {
     }
 
     @Test
-    void linkFromHtml() throws ParseException, IOException {
+    void linkFromHtml() throws Exception {
         try (Sink sink = getSink()) {
             parseFile(htmlParser, "link", "html", getSink());
         }
@@ -716,7 +716,7 @@ class MarkdownSinkTest extends AbstractSinkTest {
     }
 
     @Test
-    void verbatimInTableCell() throws ParseException, IOException {
+    void verbatimInTableCell() throws Exception {
         try (Sink sink = getSink()) {
             sink.table();
             sink.tableRows();
@@ -750,7 +750,7 @@ class MarkdownSinkTest extends AbstractSinkTest {
      * follows as {@code <object>} fallback content. See MDOXIA-159.
      */
     @Test
-    void unknownObjectEventIsRenderedAsExplicitlyClosedRawHtml() throws 
IOException {
+    void unknownObjectEventIsRenderedAsExplicitlyClosedRawHtml() throws 
Exception {
         SinkEventAttributeSet attributes = new SinkEventAttributeSet();
         attributes.addAttribute("type", "image/svg+xml");
         attributes.addAttribute("data", "x.svg");
@@ -768,7 +768,7 @@ class MarkdownSinkTest extends AbstractSinkTest {
      * void element, so it is still fine to render it self-closed. See 
MDOXIA-159.
      */
     @Test
-    void unknownMapAndAreaEventsAreRenderedAsRawHtml() throws IOException {
+    void unknownMapAndAreaEventsAreRenderedAsRawHtml() throws Exception {
         SinkEventAttributeSet mapAttributes = new SinkEventAttributeSet();
         mapAttributes.addAttribute("name", "imgmap");
         SinkEventAttributeSet areaAttributes = new SinkEventAttributeSet();

Reply via email to