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/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/TestHealer.java
View file @
d5af975e
...
...
@@ -45,7 +45,7 @@ public class TestHealer {
c
.
runChecks
();
Building
b
=
null
;
for
(
Building
building
:
model
.
getBuildings
())
{
for
(
Building
building
:
model
.
getBuildings
()
.
toList
()
)
{
if
(
building
.
getGmlId
().
getGmlString
().
equals
(
"DEBE08YYF0004KZs"
))
{
b
=
building
;
break
;
...
...
@@ -125,8 +125,8 @@ public class TestHealer {
c
.
runChecks
();
Healer
healer
=
new
Healer
(
c
);
Geometry
geom
=
model
.
getBuildings
().
get
(
0
).
getGeometries
().
get
(
0
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
Geometry
geom
=
model
.
getBuildings
().
toList
().
get
(
0
).
getGeometries
().
get
(
0
);
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
c
.
runChecks
();
assertFalse
(
geom
.
containsAnyError
());
...
...
@@ -151,11 +151,11 @@ public class TestHealer {
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
);
Healer
healer
=
new
Healer
(
c
);
healer
.
setNumberOfIterations
(
33
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
c
.
runChecks
();
assertFalse
(
geom
.
containsAnyError
());
...
...
@@ -171,10 +171,10 @@ public class TestHealer {
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
);
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
c
.
runChecks
();
assertFalse
(
geom
.
containsAnyError
());
...
...
@@ -190,11 +190,11 @@ public class TestHealer {
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
);
Healer
healer
=
new
Healer
(
c
);
healer
.
setNumberOfIterations
(
83
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
c
.
runChecks
();
assertFalse
(
geom
.
containsAnyError
());
...
...
@@ -210,11 +210,11 @@ public class TestHealer {
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
);
Healer
healer
=
new
Healer
(
c
);
healer
.
setNumberOfIterations
(
165
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
c
.
runChecks
();
assertFalse
(
geom
.
containsAnyError
());
...
...
@@ -241,7 +241,7 @@ public class TestHealer {
Checker
c
=
new
Checker
(
config
,
model
);
c
.
runChecks
();
Building
b
=
model
.
getBuildings
().
get
(
0
);
Building
b
=
model
.
getBuildings
().
toList
().
get
(
0
);
Healer
healer
=
new
Healer
(
c
);
healer
.
healCityObject
(
b
);
c
.
runChecks
();
...
...
@@ -261,11 +261,11 @@ public class TestHealer {
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
);
Healer
healer
=
new
Healer
(
c
);
healer
.
setNumberOfIterations
(
45
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
c
.
runChecks
();
assertFalse
(
geom
.
containsAnyError
());
...
...
@@ -297,10 +297,10 @@ public class TestHealer {
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
);
Healer
healer
=
new
Healer
(
c
);
healer
.
setNumberOfIterations
(
100
);
healer
.
healCityObject
(
model
.
getBuildings
().
get
(
0
));
healer
.
healCityObject
(
model
.
getBuildings
().
toList
().
get
(
0
));
c
.
runChecks
();
assertFalse
(
geom
.
containsAnyError
());
...
...
CityDoctorParent/Extensions/CityDoctorHealer/src/test/java/de/hft/stuttgart/citydoctor2/healing/TestUtil.java
View file @
d5af975e
...
...
@@ -38,15 +38,15 @@ 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
)
{
...
...
@@ -85,17 +85,17 @@ public class TestUtil {
if
(
featureId
==
null
)
{
return
null
;
}
for
(
CityObject
co
:
model
.
getBuildings
())
{
for
(
CityObject
co
:
model
.
getBuildings
()
.
toList
()
)
{
if
(
featureId
.
equals
(
co
.
getGmlId
().
getGmlString
()))
{
return
co
;
}
}
for
(
CityObject
co
:
model
.
getTransportation
())
{
for
(
CityObject
co
:
model
.
getTransportation
()
.
toList
()
)
{
if
(
featureId
.
equals
(
co
.
getGmlId
().
getGmlString
()))
{
return
co
;
}
}
for
(
CityObject
co
:
model
.
getVegetation
())
{
for
(
CityObject
co
:
model
.
getVegetation
()
.
toList
()
)
{
if
(
featureId
.
equals
(
co
.
getGmlId
().
getGmlString
()))
{
return
co
;
}
...
...
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