added asserts
This commit is contained in:
parent
b463929c28
commit
3cb9a9f4a2
|
@ -3490,7 +3490,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNearSearchNear() {
|
||||
public void testNearSearchApproximate() {
|
||||
Location loc = new Location();
|
||||
double latitude = 1000.0;
|
||||
double longitude = 2000.0;
|
||||
|
|
|
@ -53,8 +53,8 @@ public class MatchUrlServiceTest extends BaseJpaTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testPullOutNearDistance() {
|
||||
Double kmDistance = 123.4;
|
||||
public void testParseNearDistance() {
|
||||
double kmDistance = 123.4;
|
||||
|
||||
SearchParameterMap map = myMatchUrlService.translateMatchUrl(
|
||||
"Location?" +
|
||||
|
@ -63,8 +63,9 @@ public class MatchUrlServiceTest extends BaseJpaTest {
|
|||
Location.SP_NEAR_DISTANCE + "=" + kmDistance + "|http://unitsofmeasure.org|km", ourCtx.getResourceDefinition("Location"));
|
||||
|
||||
QuantityParam nearDistanceParam = map.getNearDistanceParam();
|
||||
assertEquals(1, map.size());
|
||||
assertNotNull(nearDistanceParam);
|
||||
// FIXME KHS assert
|
||||
assertEquals(kmDistance, nearDistanceParam.getValue().doubleValue(), 0.0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -655,4 +655,8 @@ public class SearchParameterMap implements Serializable {
|
|||
public List<List<IQueryParameterType>> remove(String theName) {
|
||||
return mySearchParameterMap.remove(theName);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return mySearchParameterMap.size();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue