Skip to content

Commit

Permalink
Updated test #929
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Jun 18, 2024
1 parent 36ad62b commit a751468
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/test/groovy/au/org/ala/ecodata/SiteServiceSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,19 @@ class SiteServiceSpec extends MongoSpec implements ServiceUnitTest<SiteService>
service.populateLocationMetadataForSite(site)
then:
1 * spatialServiceMock.intersectGeometry(_, _) >> [:]
2 * spatialServiceMock.intersectGeometry(_, _) >> ["electorate":["Bean"], "state":["ACT"]]
site.extent.geometry.aream2 == 4938.9846950349165d
site.extent.geometry.electorate == ["Bean"]
site.extent.geometry.state == ["ACT"]
when:
site.type = Site.TYPE_WORKS_AREA
service.populateLocationMetadataForSite(site)
then:
1 * spatialServiceMock.intersectGeometry(_, _) >> [:]
then: "Each feature is intersected individually and duplicates removed"
1 * spatialServiceMock.intersectGeometry(_, _) >> ["state":["ACT"]]
site.extent.geometry.aream2 == 2469.492347517461
site.extent.geometry.state == ["ACT"]
}
Expand Down

0 comments on commit a751468

Please sign in to comment.