First tiny test

This commit is contained in:
Arnaud Roques 2021-03-19 18:27:58 +01:00
parent ad2e9d5fb3
commit f7b9b3181e
2 changed files with 59 additions and 0 deletions

43
pom.xml
View File

@ -57,6 +57,19 @@
<version>5</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.7.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
@ -64,6 +77,23 @@
<version>1.10.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.19.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scilab.forge</groupId>
<artifactId>jlatexmath</artifactId>
<version>1.0.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<licenses>
@ -95,6 +125,7 @@
<build>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<testSourceDirectory>${project.basedir}/test</testSourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src</directory>
@ -176,6 +207,18 @@
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<environmentVariables>
<PLANTUML_SECURITY_PROFILE>UNSECURE</PLANTUML_SECURITY_PROFILE>
</environmentVariables>
<systemPropertyVariables>
<java.awt.headless>true</java.awt.headless>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>

View File

@ -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);
}
}