Skip to content

Commit

Permalink
Add wms ncml enhancements test case
Browse files Browse the repository at this point in the history
  • Loading branch information
tdrwenski committed Jan 9, 2024
1 parent 27ae1f9 commit f2d8864
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ public void shouldApplyOffsetToData() throws IOException, JDOMException {
checkValue(withoutOffsetEndpoint, 7.5);
}

@Test
public void shouldApplyNcmlOffsetToData() throws IOException, JDOMException {
final String datasetPath = "testOffsetWithNcml.nc";

final String withOffsetEndpoint = createGetFeatureInfoEndpoint(datasetPath, "variableWithOffset");
checkValue(withOffsetEndpoint, 7.5);

final String withoutOffsetEndpoint = createGetFeatureInfoEndpoint(datasetPath, "variableWithoutOffset");
checkValue(withoutOffsetEndpoint, -92.5);
}

private String createGetFeatureInfoEndpoint(String path, String variableName) {
return TestOnLocalServer.withHttpPath("/wms/" + path + "?LAYERS=" + variableName
+ "&service=WMS&version=1.3.0&CRS=CRS:84&BBOX=0,0,10,10&WIDTH=100&HEIGHT=100"
Expand Down

0 comments on commit f2d8864

Please sign in to comment.