Skip to content

Commit

Permalink
MAT-7166: formatting changes from build
Browse files Browse the repository at this point in the history
  • Loading branch information
nmorasb committed Jun 7, 2024
1 parent 716ff0b commit 2bc4d2a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,19 +328,26 @@ private String generateReadMe(List<TestCase> testCases) {
return readMe;
}

private String generateMadieMetadataFile(List<TestCase> testCases) throws JsonProcessingException {
private String generateMadieMetadataFile(List<TestCase> testCases)
throws JsonProcessingException {
if (CollectionUtils.isEmpty(testCases)) {
return "";
}
List<TestCaseExportMetaData> metaDataList = testCases.stream().map(testCase ->
TestCaseExportMetaData.builder()
.testCaseId(testCase.getId())
.title(testCase.getTitle())
.series(testCase.getSeries())
.description(testCase.getDescription())
.patientId(testCase.getPatientId() == null ? null : testCase.getPatientId().toString())
.build()
).toList();
List<TestCaseExportMetaData> metaDataList =
testCases.stream()
.map(
testCase ->
TestCaseExportMetaData.builder()
.testCaseId(testCase.getId())
.title(testCase.getTitle())
.series(testCase.getSeries())
.description(testCase.getDescription())
.patientId(
testCase.getPatientId() == null
? null
: testCase.getPatientId().toString())
.build())
.toList();
ObjectMapper mapper = new ObjectMapper();
return mapper.writeValueAsString(metaDataList);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.when;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand All @@ -38,7 +37,6 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
Expand Down Expand Up @@ -320,9 +318,15 @@ void getTestCaseExportBundleReturnsMeasureReportWithNoGroupPopulations() {
assertEquals(0, measureReport.getGroup().size());
}

// @Disabled
// @Disabled
@Test
void zipTestCaseContents() throws IOException, ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException, NoSuchMethodException {
void zipTestCaseContents()
throws IOException,
ClassNotFoundException,
InvocationTargetException,
InstantiationException,
IllegalAccessException,
NoSuchMethodException {

Map<String, Bundle> testCaseBundleMap = new HashMap<>();
testCaseBundleMap.put(
Expand All @@ -336,7 +340,9 @@ void zipTestCaseContents() throws IOException, ClassNotFoundException, Invocatio
.newJsonParser()
.parseResource(Bundle.class, madieMeasure.getTestCases().get(1).getJson()));

factory.when(() -> PackagingUtilityFactory.getInstance(anyString())).thenReturn(new PackagingUtilityImpl());
factory
.when(() -> PackagingUtilityFactory.getInstance(anyString()))
.thenReturn(new PackagingUtilityImpl());
byte[] result =
testCaseBundleService.zipTestCaseContents(
madieMeasure, testCaseBundleMap, madieMeasure.getTestCases());
Expand Down

0 comments on commit 2bc4d2a

Please sign in to comment.