more test fixes
This commit is contained in:
parent
e4f6ec5a7b
commit
390e25ddae
|
@ -5,6 +5,7 @@
|
|||
* Add checking around internal status consistency and across dependencies (draft/experimental/retired/deprecated)
|
||||
* Improved error messages on server failure
|
||||
* Fix bug in warning about No valid Display Names found
|
||||
* Use Supplements when validating display names
|
||||
* Fix issue in FHIRPath .combine focus handling
|
||||
* Check Extension fixed values for URLs - enforce consistency
|
||||
* Fix R4 FML parser problem
|
||||
|
|
|
@ -306,7 +306,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||
} catch (Exception e) {
|
||||
throw new FHIRException(formatMessage(canNoTS
|
||||
? I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER_USE_PARAMETER_TX_NA_TUN_RUN_WITHOUT_USING_TERMINOLOGY_SERVICES_TO_VALIDATE_LOINC_SNOMED_ICDX_ETC_ERROR__
|
||||
: I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER, e.getMessage()), e);
|
||||
: I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER, e.getMessage(), client.getAddress()), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon
|
|||
setTxCaps(capabilityStatement);
|
||||
return capabilitiesStatementQuick.getSoftware().getVersion();
|
||||
} catch (Exception e) {
|
||||
throw new FHIRException(formatMessage(canNoTS ? I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER_USE_PARAMETER_TX_NA_TUN_RUN_WITHOUT_USING_TERMINOLOGY_SERVICES_TO_VALIDATE_LOINC_SNOMED_ICDX_ETC_ERROR__ : I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER, e.getMessage()), e);
|
||||
throw new FHIRException(formatMessage(canNoTS ? I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER_USE_PARAMETER_TX_NA_TUN_RUN_WITHOUT_USING_TERMINOLOGY_SERVICES_TO_VALIDATE_LOINC_SNOMED_ICDX_ETC_ERROR__ : I18nConstants.UNABLE_TO_CONNECT_TO_TERMINOLOGY_SERVER, e.getMessage(), client.getAddress()), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -465,7 +465,7 @@ Parser_Type__not_supported = Parser Type {0} not supported
|
|||
Version_mismatch_The_context_has_version__loaded_and_the_new_content_being_loaded_is_version_ = Version mismatch. The context has version {0} loaded, and the new content being loaded is version {1}
|
||||
Error_reading__from_package__ = Error reading {0} from package {1}#{2}: {3}
|
||||
Error_parsing_ = Error parsing {0}:{1}
|
||||
Unable_to_connect_to_terminology_server_Use_parameter_tx_na_tun_run_without_using_terminology_services_to_validate_LOINC_SNOMED_ICDX_etc_Error__ = Unable to connect to terminology server. Use parameter ''-tx n/a'' to run without using terminology services to validate LOINC, SNOMED, ICD-X etc. Error = {0}
|
||||
Unable_to_connect_to_terminology_server_Use_parameter_tx_na_tun_run_without_using_terminology_services_to_validate_LOINC_SNOMED_ICDX_etc_Error__ = Unable to connect to terminology server at {1}. Use parameter ''-tx n/a'' to run without using terminology services to validate LOINC, SNOMED, ICD-X etc. Error = {0}
|
||||
Display_Name_for__should_be_one_of__instead_of_one = Wrong Display Name ''{4}'' for {1}#{2} - should be {3} (for the language(s) ''{5}'')
|
||||
Display_Name_for__should_be_one_of__instead_of_other = Wrong Display Name ''{4}'' for {1}#{2} - should be one of {0} choices: {3} (for the language(s) ''{5}'')
|
||||
Display_Name_WS_for__should_be_one_of__instead_of_one = Wrong whitespace in Display Name ''{4}'' for {1}#{2} - should be {3} (for the language(s) ''{5}'')
|
||||
|
@ -697,7 +697,7 @@ UNSUPPORTED_IDENTIFIER_PATTERN_PROPERTY_NOT_SUPPORTED_FOR_DISCRIMINATOR_FOR_SLIC
|
|||
UNSUPPORTED_IDENTIFIER_PATTERN_NO_PROPERTY_NOT_SUPPORTED_FOR_DISCRIMINATOR_FOR_SLICE = Unsupported: no properties with values found on type {2} for pattern for discriminator ({0}) for slice {1}
|
||||
SD_NESTED_MUST_SUPPORT_DIFF = The element {0} has types/profiles/targets that are marked as must support, but the element itself is not marked as must-support. The inner must-supports will be ignored unless the element inherits must-support = true
|
||||
SD_NESTED_MUST_SUPPORT_SNAPSHOT = The element {0} has types/profiles/targets that are marked as must support, but the element itself is not marked as must-support
|
||||
Unable_to_connect_to_terminology_server = Unable to connect to terminology server. Error = {0}
|
||||
Unable_to_connect_to_terminology_server = Unable to connect to terminology server at {1}. Error = {0}
|
||||
SD_ED_TYPE_PROFILE_UNKNOWN = Unable to resolve profile {0}
|
||||
SD_ED_TYPE_PROFILE_NOTYPE = Found profile {0}, but unable to determine the type it applies to
|
||||
SD_ED_TYPE_PROFILE_WRONG = Profile {0} is for type {1}, but the {3} element has type {2}
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.hl7.fhir.r5.elementmodel.Manager;
|
|||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.utilities.TimeTracker;
|
||||
import org.hl7.fhir.utilities.settings.FhirSettings;
|
||||
import org.hl7.fhir.validation.ValidationEngine;
|
||||
import org.hl7.fhir.validation.cli.model.CliContext;
|
||||
import org.hl7.fhir.validation.cli.model.FileInfo;
|
||||
|
@ -60,7 +61,7 @@ class ValidationServiceTest {
|
|||
List<FileInfo> filesToValidate = new ArrayList<>();
|
||||
filesToValidate.add(new FileInfo().setFileName("test_resource.json").setFileContent(resource).setFileType(Manager.FhirFormat.JSON.getExtension()));
|
||||
|
||||
ValidationRequest request = new ValidationRequest().setCliContext(new CliContext().setTxCache(getTerminologyCacheDirectory("validationService"))).setFilesToValidate(filesToValidate);
|
||||
ValidationRequest request = new ValidationRequest().setCliContext(new CliContext().setTxServer(FhirSettings.getTxFhirDevelopment()).setTxCache(getTerminologyCacheDirectory("validationService"))).setFilesToValidate(filesToValidate);
|
||||
// Validation run 1...nothing cached yet
|
||||
myService.validateSources(request);
|
||||
verify(sessionCache, Mockito.times(1)).cacheSession(ArgumentMatchers.any(ValidationEngine.class));
|
||||
|
|
|
@ -4,6 +4,7 @@ import org.hl7.fhir.r4.context.SimpleWorkerContext;
|
|||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
import org.hl7.fhir.utilities.SystemExitManager;
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
import org.hl7.fhir.utilities.settings.FhirSettings;
|
||||
import org.hl7.fhir.validation.ValidatorCli;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -16,7 +17,7 @@ public class CDAValidationTest {
|
|||
String fn = TestingUtilities.tempFile("cda", "cda.xml");
|
||||
TextFile.stringToFile(TestingUtilities.loadTestResource("cda/cda-original.xml"), fn);
|
||||
SystemExitManager.setNoExit(true);
|
||||
ValidatorCli.main(new String[] {fn, "-ig", "hl7.cda.uv.core#current"});
|
||||
ValidatorCli.main(new String[] {fn, "-ig", "hl7.cda.uv.core#current", "-tx", FhirSettings.getTxFhirDevelopment()});
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue