33import static org .junit .Assert .assertEquals ;
44import static org .junit .Assert .assertTrue ;
55import static org .junit .Assume .assumeTrue ;
6-
76import com .fasterxml .jackson .databind .JsonNode ;
87import com .fasterxml .jackson .databind .node .JsonNodeType ;
98import java .io .IOException ;
@@ -230,7 +229,7 @@ public void getElementsCountRatioTest() {
230229 + "addr:housenumber=*" ,
231230 JsonNode .class );
232231 assertEquals (expectedValue ,
233- response .getBody ().get ("ratioResult " ).get (0 ).get ("ratio" ).asDouble (),
232+ response .getBody ().get ("result " ).get (0 ).get ("ratio" ).asDouble (),
234233 expectedValue * deltaPercentage );
235234 }
236235
@@ -246,10 +245,10 @@ public void getElementsCountRatioGroupByBoundaryTest() {
246245 assertEquals (expectedValue , StreamSupport
247246 .stream (
248247 Spliterators .spliteratorUnknownSize (
249- response .getBody ().get ("groupByBoundaryResult " ).iterator (), Spliterator .ORDERED ),
248+ response .getBody ().get ("groupByResult " ).iterator (), Spliterator .ORDERED ),
250249 false )
251250 .filter (jsonNode -> jsonNode .get ("groupByObject" ).asText ().equalsIgnoreCase ("boundary1" ))
252- .findFirst ().get ().get ("ratioResult " ).get (0 ).get ("ratio" ).asDouble (),
251+ .findFirst ().get ().get ("result " ).get (0 ).get ("ratio" ).asDouble (),
253252 expectedValue * deltaPercentage );
254253 }
255254
@@ -438,7 +437,7 @@ public void getElementsLengthRatioTest() {
438437 + "&time=2011-12-13&&filter=type:way and highway=*&filter2=railway=*" ,
439438 JsonNode .class );
440439 assertEquals (expectedValue ,
441- response .getBody ().get ("ratioResult " ).get (0 ).get ("ratio" ).asDouble (),
440+ response .getBody ().get ("result " ).get (0 ).get ("ratio" ).asDouble (),
442441 expectedValue * deltaPercentage );
443442 }
444443
@@ -454,10 +453,10 @@ public void getElementsLengthRatioGroupByBoundaryTest() {
454453 assertEquals (expectedValue , StreamSupport
455454 .stream (
456455 Spliterators .spliteratorUnknownSize (
457- response .getBody ().get ("groupByBoundaryResult " ).iterator (), Spliterator .ORDERED ),
456+ response .getBody ().get ("groupByResult " ).iterator (), Spliterator .ORDERED ),
458457 false )
459458 .filter (jsonNode -> jsonNode .get ("groupByObject" ).asText ().equalsIgnoreCase ("boundary1" ))
460- .findFirst ().get ().get ("ratioResult " ).get (0 ).get ("ratio" ).asDouble (),
459+ .findFirst ().get ().get ("result " ).get (0 ).get ("ratio" ).asDouble (),
461460 expectedValue * deltaPercentage );
462461 }
463462
@@ -1086,7 +1085,7 @@ public void areaRatioFilterTest() {
10861085 + "2018-01-01&filter=building=* and type:way&filter2=building=* and type:relation" ,
10871086 JsonNode .class );
10881087 assertEquals (expectedValue ,
1089- response .getBody ().get ("ratioResult " ).get (0 ).get ("ratio" ).asDouble (),
1088+ response .getBody ().get ("result " ).get (0 ).get ("ratio" ).asDouble (),
10901089 expectedValue * deltaPercentage );
10911090 }
10921091
@@ -1102,10 +1101,10 @@ public void ratioGroupByBoundaryFilterTest() {
11021101 assertEquals (expectedValue , StreamSupport
11031102 .stream (
11041103 Spliterators .spliteratorUnknownSize (
1105- response .getBody ().get ("groupByBoundaryResult " ).iterator (), Spliterator .ORDERED ),
1104+ response .getBody ().get ("groupByResult " ).iterator (), Spliterator .ORDERED ),
11061105 false )
11071106 .filter (jsonNode -> jsonNode .get ("groupByObject" ).asText ().equalsIgnoreCase ("b2" ))
1108- .findFirst ().get ().get ("ratioResult " ).get (0 ).get ("ratio" ).asDouble (),
1107+ .findFirst ().get ().get ("result " ).get (0 ).get ("ratio" ).asDouble (),
11091108 expectedValue * deltaPercentage );
11101109 }
11111110
@@ -1118,7 +1117,7 @@ public void getElementsCountRatioEmptyFilterTest() {
11181117 + "filter2=highway=*&time=2019-01-01" ,
11191118 JsonNode .class );
11201119 assertEquals (expectedValue ,
1121- response .getBody ().get ("ratioResult " ).get (0 ).get ("ratio" ).asDouble (),
1120+ response .getBody ().get ("result " ).get (0 ).get ("ratio" ).asDouble (),
11221121 expectedValue * deltaPercentage );
11231122 }
11241123
0 commit comments