diff --git a/pom.xml b/pom.xml index 91d1ed3..cb66423 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 gov.cms.madie.packaging packaging-utility - 0.2.4 + 0.2.5 packaging-utility A simple packaging-utility. diff --git a/src/main/java/gov/cms/madie/packaging/utils/PackagingUtilityFactory.java b/src/main/java/gov/cms/madie/packaging/utils/PackagingUtilityFactory.java index aa71d80..7d4c0d8 100644 --- a/src/main/java/gov/cms/madie/packaging/utils/PackagingUtilityFactory.java +++ b/src/main/java/gov/cms/madie/packaging/utils/PackagingUtilityFactory.java @@ -18,6 +18,7 @@ public static PackagingUtility getInstance(String model) new HashMap<>() { { put("QI-Core v4.1.1", "qicore411"); + put("QI-Core v6.0.0", "qicore6"); } }; diff --git a/src/main/java/gov/cms/madie/packaging/utils/qicore411/ResourceUtils.java b/src/main/java/gov/cms/madie/packaging/utils/qicore/ResourceUtils.java similarity index 97% rename from src/main/java/gov/cms/madie/packaging/utils/qicore411/ResourceUtils.java rename to src/main/java/gov/cms/madie/packaging/utils/qicore/ResourceUtils.java index 3842fed..bc5b79e 100644 --- a/src/main/java/gov/cms/madie/packaging/utils/qicore411/ResourceUtils.java +++ b/src/main/java/gov/cms/madie/packaging/utils/qicore/ResourceUtils.java @@ -1,4 +1,4 @@ -package gov.cms.madie.packaging.utils.qicore411; +package gov.cms.madie.packaging.utils.qicore; import org.apache.commons.lang3.StringUtils; import org.hl7.fhir.r4.model.Bundle; diff --git a/src/main/java/gov/cms/madie/packaging/utils/qicore411/PackagingUtilityImpl.java b/src/main/java/gov/cms/madie/packaging/utils/qicore411/PackagingUtilityImpl.java index 5feea7a..ecaa57c 100644 --- a/src/main/java/gov/cms/madie/packaging/utils/qicore411/PackagingUtilityImpl.java +++ b/src/main/java/gov/cms/madie/packaging/utils/qicore411/PackagingUtilityImpl.java @@ -20,6 +20,7 @@ import gov.cms.madie.packaging.exceptions.InternalServerException; import gov.cms.madie.packaging.utils.PackagingUtility; import gov.cms.madie.packaging.utils.ZipUtility; +import gov.cms.madie.packaging.utils.qicore.ResourceUtils; import lombok.extern.slf4j.Slf4j; import org.hl7.fhir.r4.model.Measure; diff --git a/src/main/java/gov/cms/madie/packaging/utils/qicore6/PackagingUtilityImpl.java b/src/main/java/gov/cms/madie/packaging/utils/qicore6/PackagingUtilityImpl.java new file mode 100644 index 0000000..14cb9c8 --- /dev/null +++ b/src/main/java/gov/cms/madie/packaging/utils/qicore6/PackagingUtilityImpl.java @@ -0,0 +1,7 @@ +package gov.cms.madie.packaging.utils.qicore6; + +/** + * QI-Core 6.0.0 matches packaging requirements of QICore v4.1.1 + */ +public class PackagingUtilityImpl + extends gov.cms.madie.packaging.utils.qicore411.PackagingUtilityImpl {} diff --git a/src/test/java/gov/cms/madie/packaging/utils/ResourceUtilityFactoryTest.java b/src/test/java/gov/cms/madie/packaging/utils/ResourceUtilityFactoryTest.java index b5ea689..4014763 100644 --- a/src/test/java/gov/cms/madie/packaging/utils/ResourceUtilityFactoryTest.java +++ b/src/test/java/gov/cms/madie/packaging/utils/ResourceUtilityFactoryTest.java @@ -12,7 +12,7 @@ class ResourceUtilityFactoryTest { void testGetInstance_fails() { try { PackagingUtility utility = PackagingUtilityFactory.getInstance("QI-Core"); - fail("Should not be set " + utility.toString()); + fail("Should not be set " + utility); } catch (InstantiationException | IllegalAccessException @@ -26,7 +26,7 @@ void testGetInstance_fails() { } @Test - void testGetInstance() { + void testGetQiCore411Instance() { try { PackagingUtility utility = PackagingUtilityFactory.getInstance("QI-Core v4.1.1"); assertNotNull(utility); @@ -41,4 +41,21 @@ void testGetInstance() { fail(e); } } + + @Test + void testGetQiCore6Instance() { + try { + PackagingUtility utility = PackagingUtilityFactory.getInstance("QI-Core v6.0.0"); + assertNotNull(utility); + + } catch (InstantiationException + | IllegalAccessException + | IllegalArgumentException + | InvocationTargetException + | NoSuchMethodException + | SecurityException + | ClassNotFoundException e) { + fail(e); + } + } }