Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAT-7926] Add QI-Core 6 Support #30

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>gov.cms.madie.packaging</groupId>
<artifactId>packaging-utility</artifactId>
<version>0.2.4</version>
<version>0.2.5</version>

<name>packaging-utility</name>
<description>A simple packaging-utility.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
};

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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 {}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +26,7 @@ void testGetInstance_fails() {
}

@Test
void testGetInstance() {
void testGetQiCore411Instance() {
try {
PackagingUtility utility = PackagingUtilityFactory.getInstance("QI-Core v4.1.1");
assertNotNull(utility);
Expand All @@ -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);
}
}
}
Loading