Commit 0423dc6a authored by Luna Riegel's avatar Luna Riegel
Browse files

Build: Exclude CGAL-tests from Maven build

Adds the CppTest marker-interface to exclude Healer tests that  were
interfacing with CGAL from the build. These tests are needed for the
development of the replacement library, but shall not cause build
failures in the meantime.
parent 8aa306c7
package de.hft.stuttgart.citydoctor2.connect.edge;
/**
* Marker interface for excluding testcases that use the deprecated connection to the C++ library.
* The tests are kept for the Java replacement library that is currently being developed.
*/
public interface CppTest {
}
...@@ -7,6 +7,7 @@ import java.io.IOException; ...@@ -7,6 +7,7 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import de.hft.stuttgart.citydoctor2.connect.edge.CppTest;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
...@@ -31,6 +32,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation; ...@@ -31,6 +32,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
import de.hft.stuttgart.citydoctor2.healer.Healer; import de.hft.stuttgart.citydoctor2.healer.Healer;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException; import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException; import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
import org.junit.experimental.categories.Category;
public class HealPlanarPolygonErrorTest { public class HealPlanarPolygonErrorTest {
...@@ -47,14 +49,14 @@ public class HealPlanarPolygonErrorTest { ...@@ -47,14 +49,14 @@ public class HealPlanarPolygonErrorTest {
Assert.assertTrue(geom.containsError(CheckId.C_GE_P_NON_PLANAR)); Assert.assertTrue(geom.containsError(CheckId.C_GE_P_NON_PLANAR));
Healer healer = new Healer(c); Healer healer = new Healer(c);
healer.setNumberOfIterations(2);
healer.healCityObject(model.getBuildings().toList().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_P_NON_PLANAR)); Assert.assertFalse(geom.containsError(CheckId.C_GE_P_NON_PLANAR));
} }
@Test @Test
@Category(CppTest.class)
public void testNonplanarPolygon() { public void testNonplanarPolygon() {
CppInitializer.initCpp(); CppInitializer.initCpp();
Building b = new Building(); Building b = new Building();
...@@ -160,6 +162,7 @@ public class HealPlanarPolygonErrorTest { ...@@ -160,6 +162,7 @@ public class HealPlanarPolygonErrorTest {
} }
@Test @Test
@Category(CppTest.class)
public void testNonplanarPolygon_Split() { public void testNonplanarPolygon_Split() {
CppInitializer.initCpp(); CppInitializer.initCpp();
Building b = new Building(); Building b = new Building();
...@@ -274,6 +277,7 @@ public class HealPlanarPolygonErrorTest { ...@@ -274,6 +277,7 @@ public class HealPlanarPolygonErrorTest {
} }
@Test @Test
@Category(CppTest.class)
public void testNonplanarPolygon_Split2() { public void testNonplanarPolygon_Split2() {
CppInitializer.initCpp(); CppInitializer.initCpp();
Building b = new Building(); Building b = new Building();
......
...@@ -6,6 +6,7 @@ import static org.junit.Assert.assertTrue; ...@@ -6,6 +6,7 @@ import static org.junit.Assert.assertTrue;
import java.io.IOException; import java.io.IOException;
import de.hft.stuttgart.citydoctor2.connect.edge.CppTest;
import org.citygml4j.xml.writer.CityGMLWriteException; import org.citygml4j.xml.writer.CityGMLWriteException;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
...@@ -33,13 +34,16 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation; ...@@ -33,13 +34,16 @@ import de.hft.stuttgart.citydoctor2.datastructure.Geometry.Orientation;
import de.hft.stuttgart.citydoctor2.healer.Healer; import de.hft.stuttgart.citydoctor2.healer.Healer;
import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException; import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException; import de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException;
import org.junit.experimental.categories.Category;
public class HealSolidNotClosedErrorTest { public class HealSolidNotClosedErrorTest {
/** /**
* One polygon is split up in 3 but has not matching edges * One polygon is split up in 3 but has not matching edges
*/ */
@Test @Test
@Category(CppTest.class)
public void testVertexCloseToEdge() { public void testVertexCloseToEdge() {
CppInitializer.initCpp(); CppInitializer.initCpp();
Building b = new Building(); //Angelika: als Test eingefügt Building b = new Building(); //Angelika: als Test eingefügt
...@@ -164,6 +168,7 @@ public class HealSolidNotClosedErrorTest { ...@@ -164,6 +168,7 @@ public class HealSolidNotClosedErrorTest {
} }
@Test @Test
@Category(CppTest.class)
public void testMissingPolygon() { public void testMissingPolygon() {
CppInitializer.initCpp(); CppInitializer.initCpp();
Building b = new Building(); Building b = new Building();
...@@ -343,6 +348,7 @@ public class HealSolidNotClosedErrorTest { ...@@ -343,6 +348,7 @@ public class HealSolidNotClosedErrorTest {
} }
@Test @Test
@Category(CppTest.class)
public void test2MissingPolygonsCpp() { public void test2MissingPolygonsCpp() {
CppInitializer.initCpp(); CppInitializer.initCpp();
Building b = new Building(); Building b = new Building();
...@@ -420,7 +426,9 @@ public class HealSolidNotClosedErrorTest { ...@@ -420,7 +426,9 @@ public class HealSolidNotClosedErrorTest {
assertNotNull(cr); assertNotNull(cr);
assertEquals(ResultStatus.OK, cr.getResultStatus()); assertEquals(ResultStatus.OK, cr.getResultStatus());
} }
/** /**
* Missing Polygon has a self intersection * Missing Polygon has a self intersection
* @throws IOException * @throws IOException
...@@ -448,7 +456,7 @@ public class HealSolidNotClosedErrorTest { ...@@ -448,7 +456,7 @@ public class HealSolidNotClosedErrorTest {
Assert.assertTrue(geom.containsError(CheckId.C_GE_S_NOT_CLOSED)); Assert.assertTrue(geom.containsError(CheckId.C_GE_S_NOT_CLOSED));
Healer healer = new Healer(c); Healer healer = new Healer(c);
//healer.setNumberOfIterations(2); healer.setNumberOfIterations(2);
healer.healCityObject(model.getBuildings().toList().get(0)); healer.healCityObject(model.getBuildings().toList().get(0));
Assert.assertFalse(geom.containsError(CheckId.C_GE_S_NOT_CLOSED)); Assert.assertFalse(geom.containsError(CheckId.C_GE_S_NOT_CLOSED));
......
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
<excludes> <excludes>
<exclude>**/SolidSelfIntCheckFalsePositiveBigMeshTest.java</exclude> <exclude>**/SolidSelfIntCheckFalsePositiveBigMeshTest.java</exclude>
</excludes> </excludes>
<excludedGroups>
de.hft.stuttgart.citydoctor2.connect.edge.CppTest
</excludedGroups>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment