added asserts

This commit is contained in:
Ken Stevens 2020-01-21 15:45:41 -05:00
parent b463929c28
commit 3cb9a9f4a2
3 changed files with 9 additions and 4 deletions

View File

@ -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;

View File

@ -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

View File

@ -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();
}
}