Skip to content
Snippets Groups Projects
Commit c50dd67f authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-5665-xDomea-Bescheid-Dateien-Download' (#595) from...

Merge pull request 'OZG-5665-xDomea-Bescheid-Dateien-Download' (#595) from OZG-5665-xDomea-Bescheid-Dateien-Download into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-app/alfa/pulls/595


Reviewed-by: default avatarOZGCloud <ozgcloud@mgm-tp.com>
parents 2878cc7b c6ad55eb
No related merge requests found
......@@ -75,7 +75,8 @@ class ExportService {
var exportFiles = Stream
.of(representations.stream(), attachments.stream(),
kommentarsData.getAttachments().stream(),
postfachMailData.getAttachments().stream())
postfachMailData.getAttachments().stream(),
bescheidData.getFiles().stream())
.flatMap(s -> s)
.toList();
return ExportData.builder().abgabe(abgabe).exportFilename(buildXmlFilename(filenameId)).exportFiles(exportFiles).build();
......
......@@ -8,7 +8,8 @@ import de.xoev.xdomea.DokumentType;
public class BescheidExportDataTestFactory {
public static final DokumentType DOKUMENT_TYPE = DokumentTypeTestFactory.create();
public static final OzgFile OZG_FILE = OzgFileTestFactory.createWithUniqueId();
public static final OzgFile ATTACHMENT = OzgFileTestFactory.createWithUniqueId();
public static final OzgFile DOCUMENT = OzgFileTestFactory.createWithUniqueId();
public static BescheidExportData create() {
return createBuilder().build();
......@@ -17,6 +18,7 @@ public class BescheidExportDataTestFactory {
public static BescheidExportData.BescheidExportDataBuilder createBuilder() {
return BescheidExportData.builder()
.dokumentType(DOKUMENT_TYPE)
.file(OZG_FILE);
.file(DOCUMENT)
.file(ATTACHMENT);
}
}
......@@ -366,18 +366,18 @@ class ExportServiceTest {
}
@Test
void shouldContainExportExportFiles() {
void shouldContainExportFiles() {
var exportData = callService();
assertThat(exportData.getExportFiles())
.hasSize(4)
.hasSize(6)
.containsAll(representations)
.containsAll(attachments)
.containsAll(kommentarsExportData.getAttachments())
.containsAll(postfachMailExportData.getAttachments());
.containsAll(postfachMailExportData.getAttachments())
.containsAll(bescheidExportData.getFiles());
}
@Test
void shouldExportKommentare() {
callService();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment