diff --git a/asciidoc/deployment/pom.xml b/asciidoc/deployment/pom.xml index b83fdfbe..792aeb75 100644 --- a/asciidoc/deployment/pom.xml +++ b/asciidoc/deployment/pom.xml @@ -25,6 +25,12 @@ io.quarkus quarkus-qute-deployment + + org.assertj + assertj-core + ${assertj.version} + test + diff --git a/asciidoc/deployment/src/test/java/io/quarkiverse/qute/web/asciidoc/test/QuarkusAsciidocTest.java b/asciidoc/deployment/src/test/java/io/quarkiverse/qute/web/asciidoc/test/QuarkusAsciidocTest.java index dfa91d84..30206620 100644 --- a/asciidoc/deployment/src/test/java/io/quarkiverse/qute/web/asciidoc/test/QuarkusAsciidocTest.java +++ b/asciidoc/deployment/src/test/java/io/quarkiverse/qute/web/asciidoc/test/QuarkusAsciidocTest.java @@ -1,10 +1,10 @@ package io.quarkiverse.qute.web.asciidoc.test; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.assertj.core.api.Assertions.assertThat; import java.util.List; -import org.junit.jupiter.api.Assertions; +import org.assertj.core.api.SoftAssertions; import org.junit.jupiter.api.Test; import io.quarkiverse.qute.web.asciidoc.runtime.AsciidocSectionHelperFactory; @@ -16,21 +16,37 @@ public class QuarkusAsciidocTest { public void testAscii() { Engine engine = Engine.builder().addDefaults() .addSectionHelper(new AsciidocSectionHelperFactory()).build(); - assertEquals("

...

\n", engine.parse("{#ascii}...{/ascii}").render()); + + String result = engine.parse("{#ascii}...{/ascii}").render(); + + assertThat(result).contains(""" +

+ ... +

+ """); } @Test public void testAsciidoc() { Engine engine = Engine.builder().addDefaults() .addSectionHelper(new AsciidocSectionHelperFactory()).build(); - assertEquals("

...

\n", engine.parse("{#asciidoc}...{/asciidoc}").render()); - } + + String result = engine.parse("{#asciidoc}...{/asciidoc}").render(); + + assertThat(result).contains(""" +

+ ... +

+ """); } @Test public void testH1() { Engine engine = Engine.builder().addDefaults() .addSectionHelper(new AsciidocSectionHelperFactory()).build(); - assertEquals("

Quarkus and Roq

\n", engine.parse("{#ascii}= Quarkus and Roq{/ascii}").render()); + + String result = engine.parse("{#ascii}= Quarkus and Roq{/ascii}").render(); + + assertThat(result).contains("

Quarkus and Roq

"); } @Test @@ -51,16 +67,28 @@ void testJsonObjectValueResolver() { """).data("items", List.of("apple", "banana", "cherry")) .render(); - Assertions.assertEquals(""" -

Quarkus and Qute

-

Qute and Roq

-

Here is a list:

- - """, result); - + SoftAssertions.assertSoftly(softly -> { + softly.assertThat(result).isEqualTo(""" +

Quarkus and Qute

+
+ Here is a list: + +
+
+ +
+ """); + }); } } diff --git a/pom.xml b/pom.xml index c8c62ed8..291a01af 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,7 @@ 3.6.9 0.22.0 1.2.3 + 3.26.3