1
0
mirror of https://github.com/pcvolkmer/mv64e-onkostar-data.git synced 2025-09-14 00:12:52 +00:00

refactor: extract single result set mapping

This commit is contained in:
2025-06-21 16:28:53 +02:00
parent 6f59bf767a
commit e578d36e1b
7 changed files with 65 additions and 59 deletions

View File

@@ -20,7 +20,6 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.when;
@ExtendWith(MockitoExtension.class)
class KpaTumorausbreitungDataMapperTest {
@@ -60,16 +59,10 @@ class KpaTumorausbreitungDataMapperTest {
return testData.get(columnName);
}).when(resultSet).getDate(anyString());
when(resultSet.getProcedureId()).thenReturn(1);
doAnswer(invocationOnMock -> List.of(resultSet))
.when(catalogue)
.getAllByParentId(anyInt());
doAnswer(invocationOnMock -> List.of(resultSet))
.when(catalogue)
.getDiseases(anyInt());
var actualList = this.dataMapper.getByParentId(1);
assertThat(actualList).hasSize(1);