Skip to content

Commit

Permalink
Fix typing at parsing test
Browse files Browse the repository at this point in the history
  • Loading branch information
inigo-cobian committed Feb 27, 2024
1 parent 23653ed commit 75807da
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void parseFileValues() throws JsonMappingException, JsonProcessingExcepti
+ "'file:values':[{'values':[0],'summary':'No Data'},{'values':[1],'summary':'Water'},{'values':[2, 3],'summary':'Trees'},{'values':[4],'summary':'Flooded vegetation'},{'values':[5],'summary':'Crops'}]}";
JSONObject node = new JSONObject(assetJSON);

Map<String, String> result = STACAssetParser.getFileValues(node);
Map<String, Object> result = STACAssetParser.getFileValues(node);

assertThat(result.keySet(), containsInAnyOrder("0", "1", "2", "3", "4", "5"));
assertThat(result.values(), containsInAnyOrder("No Data", "Water", "Trees", "Trees", "Flooded vegetation", "Crops"));
Expand All @@ -31,7 +31,7 @@ public void parseWithNoFileValues() {
String assetJSON = "{'type':'image/tiff; application=geotiff; profile=cloud-optimized','roles':['data'],'title':'Global land cover data'}";
JSONObject node = new JSONObject(assetJSON);

Map<String, String> result = STACAssetParser.getFileValues(node);
Map<String, Object> result = STACAssetParser.getFileValues(node);

assertThat(result.values(), is(empty()));
}
Expand Down

0 comments on commit 75807da

Please sign in to comment.