mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-02-09 06:14:45 +00:00
move test cases
This commit is contained in:
parent
09648b7ea0
commit
0e41463886
@ -6,3 +6,5 @@
|
||||
## Other code changes
|
||||
|
||||
* rename ig-r4.json to ig-r4.jsonx in IGs
|
||||
* move R5 package to test cases
|
||||
|
||||
|
@ -114,7 +114,13 @@ public class TestingUtilities extends BaseTestingUtilities {
|
||||
FilesystemPackageCacheManager pcm;
|
||||
try {
|
||||
pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
|
||||
IWorkerContext fcontext = getWorkerContext(pcm.loadPackage(VersionUtilities.packageForVersion(version), version));
|
||||
IWorkerContext fcontext = null;
|
||||
if (VersionUtilities.isR5Ver(version)) {
|
||||
// for purposes of stability, the R5 core package comes from the test case repository
|
||||
fcontext = getWorkerContext(loadR5CorePackage());
|
||||
} else {
|
||||
fcontext = getWorkerContext(pcm.loadPackage(VersionUtilities.packageForVersion(version), version));
|
||||
}
|
||||
fcontext.setUcumService(new UcumEssenceService(TestingUtilities.loadTestResourceStream("ucum", "ucum-essence.xml")));
|
||||
fcontext.setExpansionProfile(new Parameters());
|
||||
if (!fcontext.hasPackage("hl7.terminology.r5", null)) {
|
||||
@ -135,6 +141,10 @@ public class TestingUtilities extends BaseTestingUtilities {
|
||||
}
|
||||
}
|
||||
|
||||
private static NpmPackage loadR5CorePackage() throws IOException {
|
||||
return NpmPackage.fromPackage(TestingUtilities.loadTestResourceStream("r5", "packages", "hl7.fhir.r5.core.tgz"));
|
||||
}
|
||||
|
||||
public static String getTerminologyCacheDirectory() {
|
||||
return TestConfig.getInstance().getTxCacheDirectory("org.hl7.fhir.r5");
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class ParsingTests {
|
||||
public static Stream<Arguments> data() throws ParserConfigurationException, IOException, FHIRFormatError, SAXException {
|
||||
FilesystemPackageCacheManager pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
|
||||
// npm = pcm.loadPackage("hl7.fhir.r5.examples", "5.0.0");
|
||||
npm = NpmPackage.fromPackage(TestingUtilities.loadTestResourceStream("r5", "hl7.fhir.r5.examples.tgz"));
|
||||
npm = NpmPackage.fromPackage(TestingUtilities.loadTestResourceStream("r5", "packages", "hl7.fhir.r5.examples.tgz"));
|
||||
List<Arguments> objects = new ArrayList<>();
|
||||
List<String> names = npm.list("package");
|
||||
for (String n : names) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user