From a2a02811554a0230de0ccdb28d386412ed5f47f7 Mon Sep 17 00:00:00 2001 From: Matej Lukes <456316@mail.muni.cz> Date: Sat, 9 May 2020 22:17:24 +0200 Subject: [PATCH] mesh model tests moved from project application to MeshModel projet and changed to junit 3 --- MeshModel/pom.xml | 8 +++++--- .../fidentis/analyst/mesh/core/CornerTableRowTest.java | 10 ++++++---- .../cz/fidentis/analyst/mesh/core/CornerTableTest.java | 5 +++-- 3 files changed, 14 insertions(+), 9 deletions(-) rename {application => MeshModel}/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java (81%) rename {application => MeshModel}/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java (96%) diff --git a/MeshModel/pom.xml b/MeshModel/pom.xml index f9ee0adf..630d488f 100644 --- a/MeshModel/pom.xml +++ b/MeshModel/pom.xml @@ -56,6 +56,7 @@ <target>8</target> </configuration> </plugin> + </plugins> </build> <repositories> @@ -88,10 +89,11 @@ <artifactId>vecmath</artifactId> <version>1.5.2</version> </dependency> + <!-- https://mvnrepository.com/artifact/junit/junit --> <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter</artifactId> - <version>RELEASE</version> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> diff --git a/application/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java similarity index 81% rename from application/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java rename to MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java index ab3aed7d..3beb127e 100644 --- a/application/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java +++ b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableRowTest.java @@ -1,6 +1,8 @@ package cz.fidentis.analyst.mesh.core; -import static org.junit.jupiter.api.Assertions.*; +import org.testng.annotations.Test; + +import static org.testng.AssertJUnit.assertEquals; /** * Unit test for cornerTableRow @@ -10,7 +12,7 @@ class CornerTableRowTest { /** * unit test for getVertex */ - @org.junit.jupiter.api.Test + @Test void getVertexIndex() { CornerTableRow row = new CornerTableRow(42, -1); assertEquals(42, row.getVertexIndex()); @@ -19,7 +21,7 @@ class CornerTableRowTest { /** * Unit test for getOppositeCornerIndex */ - @org.junit.jupiter.api.Test + @Test void getOppositeCornerIndex() { CornerTableRow row = new CornerTableRow(0, 42); assertEquals(42, row.getOppositeCornerIndex()); @@ -28,7 +30,7 @@ class CornerTableRowTest { /** * Unit test for setOppositeCornerIndex */ - @org.junit.jupiter.api.Test + @Test void setOppositeCornerIndex() { CornerTableRow row = new CornerTableRow(0, 42); assertEquals(42, row.getOppositeCornerIndex()); diff --git a/application/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java similarity index 96% rename from application/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java rename to MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java index da59ff1c..bf633967 100644 --- a/application/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java +++ b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/core/CornerTableTest.java @@ -1,8 +1,9 @@ package cz.fidentis.analyst.mesh.core; -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; +import org.testng.annotations.Test; + +import static org.testng.AssertJUnit.assertEquals; /** * Unit tests for CornerTable -- GitLab