FIx test issues
This commit is contained in:
parent
a2a81f9878
commit
e8139192e0
|
@ -108,6 +108,29 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
|
|||
myClient.registerInterceptor(myCapturingInterceptor);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeleteConditional() {
|
||||
|
||||
Patient p = new Patient();
|
||||
p.addName().setFamily("FAM").addGiven("GIV");
|
||||
IIdType id = myPatientDao.create(p).getId();
|
||||
|
||||
myClient.read().resource("Patient").withId(id.toUnqualifiedVersionless()).execute();
|
||||
|
||||
myClient
|
||||
.delete()
|
||||
.resourceConditionalByUrl("Patient?family=FAM&given=giv")
|
||||
.execute();
|
||||
|
||||
try {
|
||||
myClient.read().resource("Patient").withId(id.toUnqualifiedVersionless()).execute();
|
||||
fail();
|
||||
} catch (ResourceGoneException e) {
|
||||
// good
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Before
|
||||
public void beforeDisableResultReuse() {
|
||||
myDaoConfig.setReuseCachedSearchResultsForMillis(null);
|
||||
|
|
|
@ -105,7 +105,7 @@ where res_id in (
|
|||
where ((res.res_ver + 1) = (rv.res_ver))
|
||||
)
|
||||
|
||||
|
||||
# Oracle
|
||||
drop table hfj_history_tag cascade constraints;
|
||||
drop table hfj_forced_id cascade constraints;
|
||||
drop table hfj_res_link cascade constraints;
|
||||
|
|
|
@ -87,8 +87,8 @@ public class FhirTesterConfig {
|
|||
.addServer()
|
||||
.withId("spark2")
|
||||
.withFhirVersion(FhirVersionEnum.DSTU3)
|
||||
.withBaseUrl("http://vonk.furore.com/")
|
||||
.withName("Vonk - Furore (STU3 FHIR)");
|
||||
.withBaseUrl("http://vonk.fire.ly/")
|
||||
.withName("Vonk - Firely (STU3 FHIR)");
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
|
|
@ -330,17 +330,19 @@
|
|||
<baseResourceName>test</baseResourceName>
|
||||
-->
|
||||
<baseResourceName>testscript</baseResourceName>
|
||||
<baseResourceName>user</baseResourceName>
|
||||
<baseResourceName>valueset</baseResourceName>
|
||||
<baseResourceName>visionprescription</baseResourceName>
|
||||
</baseResourceNames>
|
||||
<package>ca.uhn.fhir.model.dstu2</package>
|
||||
<version>dstu2</version>
|
||||
<buildDatatypes>true</buildDatatypes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!-- <execution> <id>clean_source</id> <goals> <goal>minimize-resources</goal> </goals> <configuration> <fhirVersion>DSTU2</fhirVersion> <targetDirectory>${project.baseDir}/../hapi-tinder-plugin/</targetDirectory>
|
||||
</configuration> </execution> -->
|
||||
<!-- Removed in HAPI 3.4.0 as this isn't a real resource
|
||||
<baseResourceName>user</baseResourceName>
|
||||
-->
|
||||
<baseResourceName>valueset</baseResourceName>
|
||||
<baseResourceName>visionprescription</baseResourceName>
|
||||
</baseResourceNames>
|
||||
<package>ca.uhn.fhir.model.dstu2</package>
|
||||
<version>dstu2</version>
|
||||
<buildDatatypes>true</buildDatatypes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!-- <execution> <id>clean_source</id> <goals> <goal>minimize-resources</goal> </goals> <configuration> <fhirVersion>DSTU2</fhirVersion> <targetDirectory>${project.baseDir}/../hapi-tinder-plugin/</targetDirectory>
|
||||
</configuration> </execution> -->
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
|
@ -229,6 +229,7 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
|
|||
try {
|
||||
v.validate(null, messages, document, profile.getUrl());
|
||||
} catch (Exception e) {
|
||||
ourLog.error("Failure during validation", e);
|
||||
throw new InternalErrorException("Unexpected failure while validating resource", e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,6 +263,7 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
|
|||
try {
|
||||
v.validate(null, messages, document, profile.getUrl());
|
||||
} catch (Exception e) {
|
||||
ourLog.error("Failure during validation", e);
|
||||
throw new InternalErrorException("Unexpected failure while validating resource", e);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,39 +98,6 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
|
|||
return myBestPracticeWarningLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of
|
||||
* {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used.
|
||||
*/
|
||||
public IValidationSupport getValidationSupport() {
|
||||
return myValidationSupport;
|
||||
}
|
||||
|
||||
/**
|
||||
* If set to {@literal true} (default is true) extensions which are not known to the
|
||||
* validator (e.g. because they have not been explicitly declared in a profile) will
|
||||
* be validated but will not cause an error.
|
||||
*/
|
||||
public boolean isAnyExtensionsAllowed() {
|
||||
return myAnyExtensionsAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* If set to {@literal true} (default is false) the valueSet will not be validate
|
||||
*/
|
||||
public boolean isNoTerminologyChecks() {
|
||||
return myNoTerminologyChecks;
|
||||
}
|
||||
|
||||
/**
|
||||
* If set to {@literal true} (default is true) extensions which are not known to the
|
||||
* validator (e.g. because they have not been explicitly declared in a profile) will
|
||||
* be validated but will not cause an error.
|
||||
*/
|
||||
public void setAnyExtensionsAllowed(boolean theAnyExtensionsAllowed) {
|
||||
myAnyExtensionsAllowed = theAnyExtensionsAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the "best practice warning level". When validating, any deviations from best practices will be reported at
|
||||
* this level.
|
||||
|
@ -150,14 +117,11 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
|
|||
}
|
||||
|
||||
/**
|
||||
* If set to {@literal true} (default is false) the valueSet will not be validate
|
||||
* Returns the {@link IValidationSupport validation support} in use by this validator. Default is an instance of
|
||||
* {@link DefaultProfileValidationSupport} if the no-arguments constructor for this object was used.
|
||||
*/
|
||||
public void setNoTerminologyChecks(final boolean theNoTerminologyChecks) {
|
||||
myNoTerminologyChecks = theNoTerminologyChecks;
|
||||
}
|
||||
|
||||
public void setStructureDefintion(StructureDefinition theStructureDefintion) {
|
||||
myStructureDefintion = theStructureDefintion;
|
||||
public IValidationSupport getValidationSupport() {
|
||||
return myValidationSupport;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -168,6 +132,42 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
|
|||
myValidationSupport = theValidationSupport;
|
||||
}
|
||||
|
||||
/**
|
||||
* If set to {@literal true} (default is true) extensions which are not known to the
|
||||
* validator (e.g. because they have not been explicitly declared in a profile) will
|
||||
* be validated but will not cause an error.
|
||||
*/
|
||||
public boolean isAnyExtensionsAllowed() {
|
||||
return myAnyExtensionsAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* If set to {@literal true} (default is true) extensions which are not known to the
|
||||
* validator (e.g. because they have not been explicitly declared in a profile) will
|
||||
* be validated but will not cause an error.
|
||||
*/
|
||||
public void setAnyExtensionsAllowed(boolean theAnyExtensionsAllowed) {
|
||||
myAnyExtensionsAllowed = theAnyExtensionsAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* If set to {@literal true} (default is false) the valueSet will not be validate
|
||||
*/
|
||||
public boolean isNoTerminologyChecks() {
|
||||
return myNoTerminologyChecks;
|
||||
}
|
||||
|
||||
/**
|
||||
* If set to {@literal true} (default is false) the valueSet will not be validate
|
||||
*/
|
||||
public void setNoTerminologyChecks(final boolean theNoTerminologyChecks) {
|
||||
myNoTerminologyChecks = theNoTerminologyChecks;
|
||||
}
|
||||
|
||||
public void setStructureDefintion(StructureDefinition theStructureDefintion) {
|
||||
myStructureDefintion = theStructureDefintion;
|
||||
}
|
||||
|
||||
protected List<ValidationMessage> validate(final FhirContext theCtx, String theInput, EncodingEnum theEncoding) {
|
||||
HapiWorkerContext workerContext = new HapiWorkerContext(theCtx, myValidationSupport);
|
||||
|
||||
|
@ -219,6 +219,7 @@ public class FhirInstanceValidator extends BaseValidatorBridge implements IValid
|
|||
try {
|
||||
v.validate(null, messages, json, profile);
|
||||
} catch (Exception e) {
|
||||
ourLog.error("Failure during validation", e);
|
||||
throw new InternalErrorException("Unexpected failure while validating resource", e);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue