Skip to content

Commit

Permalink
Merge pull request #5 from MeasureAuthoringTool/MAT-6179-6180
Browse files Browse the repository at this point in the history
 MAT-6179 & 6180 remove 'v' from file names
  • Loading branch information
adongare authored Dec 27, 2023
2 parents 07b51e8 + 35998ac commit 850a929
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/gov/cms/madie/services/PackagingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public byte[] createMeasurePackage(Measure measure, String accessToken) {
String cqlDir = "cql/";
Map<String, byte[]> entries = new HashMap<>();
for (TranslatedLibrary translatedLibrary : translatedLibraries) {
String entryName = translatedLibrary.getName() + "-v" + translatedLibrary.getVersion();
String entryName = translatedLibrary.getName() + "-" + translatedLibrary.getVersion();
entries.put(resourcesDir + entryName + ".json", translatedLibrary.getElmJson().getBytes());
entries.put(resourcesDir + entryName + ".xml", translatedLibrary.getElmXml().getBytes());
entries.put(cqlDir + entryName + ".cql", translatedLibrary.getCql().getBytes());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.when;
Expand Down Expand Up @@ -63,7 +62,11 @@ void testCreateMeasurePackage() {
when(translationServiceClient.getTranslatedLibraries(measure.getCql(), TOKEN))
.thenReturn(List.of(library1, library2));
byte[] packageContents = packagingService.createMeasurePackage(measure, TOKEN);
assertNotNull(packageContents);
String packageString = new String(packageContents);
String library1FileName = library1.getName() + "-" + library1.getVersion();
assertThat(packageString, containsString(library1FileName + ".cql"));
assertThat(packageString, containsString(library1FileName + ".xml"));
assertThat(packageString, containsString(library1FileName + ".json"));
}

@Test
Expand Down

0 comments on commit 850a929

Please sign in to comment.