Skip to content

Commit

Permalink
Add extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
rkettelerij committed Dec 12, 2023
1 parent 91983d6 commit 5dce5c7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions engine/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,34 @@ func TestGeoSpatialCollections_ContainsID(t *testing.T) {
}
}

func TestProjectionsForCollections(t *testing.T) {
oaf := OgcAPIFeatures{
Datasources: &Datasources{
DefaultWGS84: Datasource{},
Additional: []AdditionalDatasource{
{Srs: "EPSG:4355"},
},
},
Collections: GeoSpatialCollections{
GeoSpatialCollection{
ID: "coll1",
Features: &CollectionEntryFeatures{
Datasources: &Datasources{
DefaultWGS84: Datasource{},
Additional: []AdditionalDatasource{
{Srs: "EPSG:4326"},
{Srs: "EPSG:3857"},
},
},
},
},
},
}

expected := []string{"EPSG:4355", "EPSG:4326", "EPSG:3857"}
assert.Equal(t, expected, oaf.ProjectionsForCollections())
}

func ptrTo[T any](val T) *T {
return &val
}

0 comments on commit 5dce5c7

Please sign in to comment.