added failing test for in-memory dstu3 case
This commit is contained in:
parent
78ab01f00b
commit
4f14e621ec
|
@ -1,5 +1,6 @@
|
||||||
package ca.uhn.fhir.jpa.subscription.module.matcher;
|
package ca.uhn.fhir.jpa.subscription.module.matcher;
|
||||||
|
|
||||||
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.searchparam.matcher.InMemoryMatchResult;
|
import ca.uhn.fhir.jpa.searchparam.matcher.InMemoryMatchResult;
|
||||||
import ca.uhn.fhir.jpa.searchparam.matcher.SearchParamMatcher;
|
import ca.uhn.fhir.jpa.searchparam.matcher.SearchParamMatcher;
|
||||||
|
@ -28,6 +29,8 @@ public class InMemorySubscriptionMatcherR3Test extends BaseSubscriptionDstu3Test
|
||||||
SearchParamMatcher mySearchParamMatcher;
|
SearchParamMatcher mySearchParamMatcher;
|
||||||
@Autowired
|
@Autowired
|
||||||
ModelConfig myModelConfig;
|
ModelConfig myModelConfig;
|
||||||
|
@Autowired
|
||||||
|
FhirContext myFhirContext;
|
||||||
|
|
||||||
private void assertUnsupported(IBaseResource resource, String criteria) {
|
private void assertUnsupported(IBaseResource resource, String criteria) {
|
||||||
assertFalse(mySearchParamMatcher.match(criteria, resource, null).supported());
|
assertFalse(mySearchParamMatcher.match(criteria, resource, null).supported());
|
||||||
|
@ -622,4 +625,22 @@ public class InMemorySubscriptionMatcherR3Test extends BaseSubscriptionDstu3Test
|
||||||
assertNotMatched(patient, badCriteria3);
|
assertNotMatched(patient, badCriteria3);
|
||||||
assertNotMatched(patient, badCriteria4);
|
assertNotMatched(patient, badCriteria4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME KHS fix this test
|
||||||
|
@Test
|
||||||
|
public void testLocationPositionNotSupported() {
|
||||||
|
Location loc = new Location();
|
||||||
|
double latitude = 30.0;
|
||||||
|
double longitude = 40.0;
|
||||||
|
Location.LocationPositionComponent position = new Location.LocationPositionComponent().setLatitude(latitude).setLongitude(longitude);
|
||||||
|
loc.setPosition(position);
|
||||||
|
double bigEnoughDistance = 100.0;
|
||||||
|
String badCriteria =
|
||||||
|
"Location?" +
|
||||||
|
Location.SP_NEAR + "=" + latitude + ":" + longitude +
|
||||||
|
"&" +
|
||||||
|
Location.SP_NEAR_DISTANCE + "=" + bigEnoughDistance + "|http://unitsofmeasure.org|km";
|
||||||
|
|
||||||
|
assertMatched(loc, badCriteria);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue