Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
d5af975e
Commit
d5af975e
authored
Oct 16, 2025
by
Luna Riegel
Browse files
Fix: Fix test failures
parent
e178e81e
Changes
42
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/systemtest/PlanarTest.java
View file @
d5af975e
...
...
@@ -106,7 +106,7 @@ public class PlanarTest {
@Test
public
void
testPlanarPolygon3
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml"
);
for
(
Polygon
p
:
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
for
(
Polygon
p
:
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
CheckResult
cr
=
p
.
getCheckResult
(
CheckId
.
C_GE_P_NON_PLANAR
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
}
...
...
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/systemtest/PolygonIntersectingRingsTest.java
View file @
d5af975e
...
...
@@ -43,7 +43,7 @@ public class PolygonIntersectingRingsTest {
@Test
public
void
testSelfIntPolygon1
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS.gml"
);
for
(
Polygon
p
:
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
for
(
Polygon
p
:
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
CheckResult
cr
=
p
.
getCheckResult
(
CheckId
.
C_GE_P_INTERSECTING_RINGS
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
}
...
...
@@ -52,7 +52,7 @@ public class PolygonIntersectingRingsTest {
@Test
public
void
testSelfIntPolygon2
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml"
);
for
(
Polygon
p
:
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
for
(
Polygon
p
:
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
CheckResult
cr
=
p
.
getCheckResult
(
CheckId
.
C_GE_P_INTERSECTING_RINGS
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
}
...
...
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/systemtest/RingClosedCheckTest.java
View file @
d5af975e
...
...
@@ -91,7 +91,7 @@ public class RingClosedCheckTest extends TestCleanUp {
@Test
public
void
testClosedRing3
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS.gml"
);
for
(
Polygon
p
:
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
for
(
Polygon
p
:
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
LinearRing
r
=
p
.
getExteriorRing
();
CheckResult
cr
=
r
.
getCheckResult
(
CheckId
.
C_GE_R_NOT_CLOSED
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
...
...
@@ -111,7 +111,7 @@ public class RingClosedCheckTest extends TestCleanUp {
@Test
public
void
testClosedRing5
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0003-T0002.gml"
,
1
);
for
(
Polygon
p
:
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
for
(
Polygon
p
:
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
LinearRing
r
=
p
.
getExteriorRing
();
CheckResult
cr
=
r
.
getCheckResult
(
CheckId
.
C_GE_R_NOT_CLOSED
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
...
...
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/systemtest/RingSelfIntersectionTest.java
View file @
d5af975e
...
...
@@ -101,7 +101,7 @@ public class RingSelfIntersectionTest {
@Test
public
void
testSelfIntPoints4
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS.gml"
);
for
(
Polygon
p
:
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
for
(
Polygon
p
:
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
LinearRing
r
=
p
.
getExteriorRing
();
CheckResult
cr
=
r
.
getCheckResult
(
CheckId
.
C_GE_R_SELF_INTERSECTION
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
...
...
@@ -131,7 +131,7 @@ public class RingSelfIntersectionTest {
@Test
public
void
testSelfIntPoints7
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS-GE-gml-LR-0004-T0005.gml"
,
2
);
for
(
Polygon
p
:
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
for
(
Polygon
p
:
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
).
getPolygons
())
{
LinearRing
r
=
p
.
getExteriorRing
();
CheckResult
cr
=
r
.
getCheckResult
(
CheckId
.
C_GE_R_SELF_INTERSECTION
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
...
...
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/systemtest/ShellNotClosedSystemTest.java
View file @
d5af975e
...
...
@@ -43,7 +43,7 @@ public class ShellNotClosedSystemTest {
@Test
public
void
testShellNotClosed1
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS.gml"
);
Geometry
g
=
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
g
=
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
CheckResult
cr
=
g
.
getCheckResult
(
CheckId
.
C_GE_S_NOT_CLOSED
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
}
...
...
@@ -51,7 +51,7 @@ public class ShellNotClosedSystemTest {
@Test
public
void
testShellNotClosed2
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0002-T0001.gml"
);
Geometry
g
=
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
g
=
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
CheckResult
cr
=
g
.
getCheckResult
(
CheckId
.
C_GE_S_NOT_CLOSED
);
assertEquals
(
ResultStatus
.
ERROR
,
cr
.
getResultStatus
());
assertEquals
(
ErrorId
.
GE_S_NOT_CLOSED
,
cr
.
getError
().
getErrorId
());
...
...
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/systemtest/TestUtil.java
View file @
d5af975e
...
...
@@ -22,6 +22,7 @@ import java.io.IOException;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Optional
;
import
de.hft.stuttgart.citydoctor2.check.Checker
;
import
de.hft.stuttgart.citydoctor2.check.ValidationConfiguration
;
...
...
@@ -89,15 +90,16 @@ public class TestUtil {
if
(
gmlId
==
null
)
{
return
null
;
}
Polygon
result
=
getPolygonById
(
gmlId
,
model
.
getBuildings
());
Polygon
result
=
getPolygonById
(
gmlId
,
model
.
getBuildings
().
toList
());
if
(
result
!=
null
)
{
return
result
;
}
result
=
getPolygonById
(
gmlId
,
model
.
getVegetation
());
result
=
getPolygonById
(
gmlId
,
model
.
getVegetation
()
.
toList
()
);
if
(
result
!=
null
)
{
return
result
;
}
return
getPolygonById
(
gmlId
,
model
.
getTransportation
());
return
getPolygonById
(
gmlId
,
model
.
getTransportation
()
.
toList
()
);
}
private
static
Polygon
getPolygonById
(
String
gmlId
,
List
<?
extends
CityObject
>
features
)
{
...
...
@@ -136,22 +138,17 @@ public class TestUtil {
if
(
featureId
==
null
)
{
return
null
;
}
for
(
CityObject
co
:
model
.
getBuildings
())
{
if
(
featureId
.
equals
(
co
.
getGmlId
().
getGml
String
()))
{
return
co
;
}
Optional
<?
extends
CityObject
>
result
=
null
;
result
=
model
.
getBuildings
().
filter
(
b
->
featureId
.
equals
(
b
.
getGmlId
().
to
String
()))
.
findFirst
();
if
(
result
.
isPresent
()){
return
result
.
get
();
}
for
(
CityObject
co
:
model
.
getTransportation
())
{
if
(
featureId
.
equals
(
co
.
getGmlId
().
getGmlString
()))
{
return
co
;
}
result
=
model
.
getTransportation
().
filter
(
t
->
featureId
.
equals
(
t
.
getGmlId
().
toString
())).
findFirst
();
if
(
result
.
isPresent
()){
return
result
.
get
();
}
for
(
CityObject
co
:
model
.
getVegetation
())
{
if
(
featureId
.
equals
(
co
.
getGmlId
().
getGmlString
()))
{
return
co
;
}
}
return
null
;
}
result
=
model
.
getVegetation
().
filter
(
t
->
featureId
.
equals
(
t
.
getGmlId
().
toString
())).
findFirst
();
return
result
.
orElse
(
null
);
}
}
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/systemtest/TooFewPolygonsSystemTest.java
View file @
d5af975e
...
...
@@ -43,7 +43,7 @@ public class TooFewPolygonsSystemTest {
@Test
public
void
testTooFewPolygons1
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS.gml"
);
Geometry
g
=
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
g
=
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
CheckResult
cr
=
g
.
getCheckResult
(
CheckId
.
C_GE_S_TOO_FEW_POLYGONS
);
assertEquals
(
ResultStatus
.
OK
,
cr
.
getResultStatus
());
}
...
...
@@ -51,7 +51,7 @@ public class TooFewPolygonsSystemTest {
@Test
public
void
testTooFewPolygons2
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
{
CityDoctorModel
c
=
TestUtil
.
loadAndCheckCityModel
(
"src/test/resources/SimpleSolid_SrefBS-GE-gml-SO-0001-T0001.gml"
);
Geometry
g
=
c
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
g
=
c
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
CheckResult
cr
=
g
.
getCheckResult
(
CheckId
.
C_GE_S_TOO_FEW_POLYGONS
);
assertEquals
(
ResultStatus
.
ERROR
,
cr
.
getResultStatus
());
assertEquals
(
ErrorId
.
GE_S_TOO_FEW_POLYGONS
,
cr
.
getError
().
getErrorId
());
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealAllPolygonsWrongOrientationErrorTest.java
View file @
d5af975e
...
...
@@ -24,11 +24,11 @@ public class HealAllPolygonsWrongOrientationErrorTest {
CityDoctorModel
model
=
TestUtil
.
loadCityModel
(
path
,
config
);
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealConsecutivePointsSameErrorTest.java
View file @
d5af975e
...
...
@@ -26,11 +26,11 @@ public class HealConsecutivePointsSameErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_R_DUPLICATE_POINT
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_R_DUPLICATE_POINT
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealHoleOutsideErrorTest.java
View file @
d5af975e
...
...
@@ -25,11 +25,11 @@ public class HealHoleOutsideErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Building
building
=
model
.
getBuildings
().
get
(
0
);
Building
building
=
model
.
getBuildings
().
toList
().
get
(
0
);
Assert
.
assertTrue
(
building
.
containsError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
building
.
containsError
(
CheckId
.
C_GE_P_HOLE_OUTSIDE
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealMissingSolidTest.java
View file @
d5af975e
...
...
@@ -138,7 +138,7 @@ public class HealMissingSolidTest {
model
.
saveAs
(
createSolidFile
.
toString
(),
false
);
CityDoctorModel
parsedModel
=
CityGmlParser
.
parseCityGmlFile
(
createSolidFile
.
toString
(),
config
.
getParserConfiguration
());
Building
building
=
parsedModel
.
getBuildings
().
get
(
0
);
Building
building
=
parsedModel
.
getBuildings
().
toList
().
get
(
0
);
assertEquals
(
1
,
building
.
getGeometries
().
size
());
Geometry
geometry2
=
building
.
getGeometries
().
get
(
0
);
assertEquals
(
GeometryType
.
SOLID
,
geometry2
.
getType
());
...
...
@@ -162,7 +162,7 @@ public class HealMissingSolidTest {
new
RequirementConfiguration
(
false
));
CityDoctorModel
model
=
CityGmlParser
.
parseCityGmlFile
(
"src/test/resources/SimpleSolid_SrefBS_withoutSolid.gml"
,
config
.
getParserConfiguration
());
Building
b
=
model
.
getBuildings
().
get
(
0
);
Building
b
=
model
.
getBuildings
().
toList
().
get
(
0
);
assertTrue
(
b
.
getGeometries
().
isEmpty
());
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealNonManifoldEdgeErrorTest.java
View file @
d5af975e
...
...
@@ -25,11 +25,11 @@ public class HealNonManifoldEdgeErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_S_NON_MANIFOLD_EDGE
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_S_NON_MANIFOLD_EDGE
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealPlanarPolygonErrorTest.java
View file @
d5af975e
...
...
@@ -43,12 +43,12 @@ public class HealPlanarPolygonErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_P_NON_PLANAR
));
Healer
healer
=
new
Healer
(
c
);
healer
.
setNumberOfIterations
(
2
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_P_NON_PLANAR
));
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealPolygonWithoutSurfaceTest.java
View file @
d5af975e
...
...
@@ -35,11 +35,11 @@ public class HealPolygonWithoutSurfaceTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Building
building
=
model
.
getBuildings
().
get
(
0
);
Building
building
=
model
.
getBuildings
().
toList
().
get
(
0
);
Assert
.
assertTrue
(
building
.
containsError
(
CheckId
.
C_SE_POLYGON_WITHOUT_SURFACE
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
building
.
containsError
(
CheckId
.
C_SE_POLYGON_WITHOUT_SURFACE
));
...
...
@@ -49,7 +49,7 @@ public class HealPolygonWithoutSurfaceTest {
CityDoctorModel
loadedModel
=
TestUtil
.
loadCityModel
(
outputFile
.
toString
(),
config
);
c
=
new
Checker
(
config
,
loadedModel
);
c
.
runChecks
();
building
=
loadedModel
.
getBuildings
().
get
(
0
);
building
=
loadedModel
.
getBuildings
().
toList
().
get
(
0
);
Assert
.
assertFalse
(
building
.
containsError
(
CheckId
.
C_SE_POLYGON_WITHOUT_SURFACE
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealPolygonWrongOrientationErrorTest.java
View file @
d5af975e
...
...
@@ -41,11 +41,11 @@ public class HealPolygonWrongOrientationErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_S_POLYGON_WRONG_ORIENTATION
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_S_POLYGON_WRONG_ORIENTATION
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealRingNotClosedErrorTest.java
View file @
d5af975e
...
...
@@ -25,11 +25,11 @@ public class HealRingNotClosedErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_R_NOT_CLOSED
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_R_NOT_CLOSED
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealRingSelfIntErrorTest.java
View file @
d5af975e
...
...
@@ -190,11 +190,11 @@ public class HealRingSelfIntErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_R_SELF_INTERSECTION
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_R_SELF_INTERSECTION
));
}
...
...
@@ -208,11 +208,11 @@ public class HealRingSelfIntErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_R_SELF_INTERSECTION
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_R_SELF_INTERSECTION
));
}
...
...
@@ -228,11 +228,11 @@ public class HealRingSelfIntErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_R_SELF_INTERSECTION
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_R_SELF_INTERSECTION
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealSameOrientationErrorTest.java
View file @
d5af975e
...
...
@@ -26,11 +26,11 @@ public class HealSameOrientationErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
Assert
.
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_P_ORIENTATION_RINGS_SAME
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_P_ORIENTATION_RINGS_SAME
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealSolidNotClosedErrorTest.java
View file @
d5af975e
...
...
@@ -439,7 +439,7 @@ public class HealSolidNotClosedErrorTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
geom
.
updateVertices
();
for
(
Vertex
v
:
geom
.
getVertices
())
{
v
.
setX
(
v
.
getX
()
-
10
);
...
...
@@ -449,7 +449,7 @@ public class HealSolidNotClosedErrorTest {
Healer
healer
=
new
Healer
(
c
);
//healer.setNumberOfIterations(2);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
Assert
.
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_S_NOT_CLOSED
));
}
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/HealTooFewPointsTest.java
View file @
d5af975e
...
...
@@ -27,11 +27,11 @@ public class HealTooFewPointsTest {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
assertTrue
(
geom
.
containsError
(
CheckId
.
C_GE_R_TOO_FEW_POINTS
));
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
assertFalse
(
geom
.
containsError
(
CheckId
.
C_GE_R_TOO_FEW_POINTS
));
}
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment