From 895a88013c9002066540db4fb2e1130e54fc483c Mon Sep 17 00:00:00 2001 From: Matthias Betz Date: Tue, 7 Jun 2022 11:17:44 +0200 Subject: [PATCH] added degenerated ring test --- .../hft/stuttgart/quality/QualityAdeTests.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/citygml4j-quality-ade/src/test/java/de/hft/stuttgart/quality/QualityAdeTests.java b/citygml4j-quality-ade/src/test/java/de/hft/stuttgart/quality/QualityAdeTests.java index ac3fdfd..51696a9 100644 --- a/citygml4j-quality-ade/src/test/java/de/hft/stuttgart/quality/QualityAdeTests.java +++ b/citygml4j-quality-ade/src/test/java/de/hft/stuttgart/quality/QualityAdeTests.java @@ -378,6 +378,22 @@ class QualityAdeTests { byte[] buf = writeModel(model); assertTrue(validate(new ByteArrayInputStream(buf))); } + + @Test + void testRingSelfIntersectionErrorDegenerateRing() throws ADEException, CityGMLContextException, CityGMLWriteException, + SAXException, IOException, SchemaHandlerException { + CityModel model = new CityModel(); + ValidationResult res = fillCityModel(model); + + RingSelfIntersectionError err = new RingSelfIntersectionError(); + err.setLinearRingId("ringId"); + err.setType(RingSelfIntType.DEGENERATED_RING); + err.setVertex1(new DirectPosition(1, 2, 3)); + res.getErrors().add(new AbstractErrorProperty(err)); + + byte[] buf = writeModel(model); + assertTrue(validate(new ByteArrayInputStream(buf))); + } @Test void testRingTooFewPointsError() throws ADEException, CityGMLContextException, CityGMLWriteException, SAXException, -- GitLab