From f7b9b3181ec1fd2c45f1daf52e1c6b3f27b5fee2 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Fri, 19 Mar 2021 18:27:58 +0100 Subject: [PATCH] First tiny test --- pom.xml | 43 +++++++++++++++++++ .../sourceforge/plantuml/ScaleHeightTest.java | 16 +++++++ 2 files changed, 59 insertions(+) create mode 100644 test/net/sourceforge/plantuml/ScaleHeightTest.java diff --git a/pom.xml b/pom.xml index 0303dc8e3..b53f19236 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,19 @@ 5 + + + + org.junit + junit-bom + 5.7.1 + pom + import + + + + + org.apache.ant @@ -64,6 +77,23 @@ 1.10.9 provided + + org.assertj + assertj-core + 3.19.0 + test + + + org.junit.jupiter + junit-jupiter + test + + + org.scilab.forge + jlatexmath + 1.0.7 + test + @@ -95,6 +125,7 @@ ${project.basedir}/src + ${project.basedir}/test ${project.basedir}/src @@ -176,6 +207,18 @@ + + maven-surefire-plugin + 3.0.0-M5 + + + UNSECURE + + + true + + + maven-release-plugin 2.1 diff --git a/test/net/sourceforge/plantuml/ScaleHeightTest.java b/test/net/sourceforge/plantuml/ScaleHeightTest.java new file mode 100644 index 000000000..7a6ee0ae2 --- /dev/null +++ b/test/net/sourceforge/plantuml/ScaleHeightTest.java @@ -0,0 +1,16 @@ +package net.sourceforge.plantuml; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +class ScaleHeightTest { + + @Test + void testScale2() { + final ScaleHeight cut = new ScaleHeight(100); + final double scale = cut.getScale(50, 50); + assertEquals(2.0, scale, .001); + } + +}