fix missing import (#6541)

Co-authored-by: jdar <justin.dar@smiledigitalhealth.com>
This commit is contained in:
jdar8 2024-12-05 18:11:11 -08:00 committed by GitHub
parent 6c4aa2c154
commit 9457a4b565
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 9 deletions

View File

@ -673,7 +673,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
}
@Test
public void testDontStripVersionsFromRefsAtPaths_inTransactionBundle_shouldPreserveVersion() {
public void testDontStripVersionsFromRefsAtPaths_inTransactionBundle_shouldPreserveVersion() throws IOException {
Set<String> referencePaths = Set.of("AuditEvent.entity.what","MessageHeader.focus","Provenance.target","Provenance.entity.what");
myFhirContext.getParserOptions().setDontStripVersionsFromReferencesAtPaths(referencePaths);
@ -685,7 +685,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
}
@Test
public void testDontStripVersionsFromRefsAtAllPaths_inTransactionBundle_shouldPreserveVersion() {
public void testDontStripVersionsFromRefsAtAllPaths_inTransactionBundle_shouldPreserveVersion() throws IOException {
myFhirContext.getParserOptions().setStripVersionsFromReferences(false);
myStorageSettings.setAutoVersionReferenceAtPaths("Encounter.subject");
myStorageSettings.setAutoCreatePlaceholderReferenceTargets(true);
@ -695,7 +695,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
}
@Test
public void testDontStripVersionsFromRefsAtPaths_withTransactionBundleAndAutoVersionSet_shouldPreserveVersion() {
public void testDontStripVersionsFromRefsAtPaths_withTransactionBundleAndAutoVersionSet_shouldPreserveVersion() throws IOException {
Set<String> referencePaths = Set.of("AuditEvent.entity.what","MessageHeader.focus","Provenance.target","Provenance.entity.what");
myFhirContext.getParserOptions().setDontStripVersionsFromReferencesAtPaths(referencePaths);
@ -710,10 +710,8 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
postBundleAndAssertProvenanceRefsPreserved("/transaction-bundles/transaction-with-client-supplied-versioned-reference.json");
}
private Provenance postBundleAndAssertProvenanceRefsPreserved(String theBundlePath) {
Bundle bundle = myFhirContext.newJsonParser().parseResource(Bundle.class,
new InputStreamReader(
FhirResourceDaoR4VersionedReferenceTest.class.getResourceAsStream(theBundlePath)));
private Provenance postBundleAndAssertProvenanceRefsPreserved(String theBundlePath) throws IOException {
Bundle bundle = loadResourceFromClasspath(Bundle.class, theBundlePath);
Bundle transaction = mySystemDao.transaction(new SystemRequestDetails(), bundle);
@ -726,7 +724,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
}
@Test
public void testDontStripVersionsFromRefsAtPathsAndAutoVersionSameTransaction_withTransactionBundle_shouldPreserveVersion() {
public void testDontStripVersionsFromRefsAtPathsAndAutoVersionSameTransaction_withTransactionBundle_shouldPreserveVersion() throws IOException {
Set<String> referencePaths = Set.of("AuditEvent.entity.what","MessageHeader.focus","Provenance.target","Provenance.entity.what", "Provenance.agent.who");
myFhirContext.getParserOptions().setDontStripVersionsFromReferencesAtPaths(referencePaths);
@ -739,7 +737,7 @@ public class FhirResourceDaoR4VersionedReferenceTest extends BaseJpaR4Test {
}
@Test
public void testDontStripVersionsFromRefsAtPaths_withTransactionBundleAndPreExistingReference_shouldPreserveVersion() {
public void testDontStripVersionsFromRefsAtPaths_withTransactionBundleAndPreExistingReference_shouldPreserveVersion() throws IOException {
Set<String> referencePaths = Set.of("AuditEvent.entity.what","MessageHeader.focus","Provenance.target","Provenance.entity.what");
myFhirContext.getParserOptions().setDontStripVersionsFromReferencesAtPaths(referencePaths);