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

OZG-4375 OZG-4716 Variablen entfernt

parent 4e99ed3c
No related branches found
No related tags found
No related merge requests found
......@@ -21,17 +21,12 @@ import de.ozgcloud.alfa.common.file.OzgFile;
import de.ozgcloud.alfa.common.file.OzgFileTestFactory;
import de.ozgcloud.alfa.file.ExportFileService;
import de.ozgcloud.alfa.vorgang.ExportVorgangService;
import de.ozgcloud.alfa.vorgang.VorgangWithEingang;
import de.ozgcloud.alfa.vorgang.VorgangWithEingangTestFactory;
import de.ozgcloud.common.test.ITCase;
@ITCase
class ExportServiceITCase {
private final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
private final VorgangWithEingang vorgangWithEingang = VorgangWithEingangTestFactory.create();
private final List<OzgFile> ozgFiles = List.of(createOzgFile());
@SpyBean
private ExportFileService exportFileService;
@SpyBean
......@@ -44,14 +39,14 @@ class ExportServiceITCase {
@BeforeEach
void setup() {
doReturn(vorgangWithEingang).when(exportVorgangService).getVorgang(anyString());
doReturn(ozgFiles).when(exportFileService).getAllPdfs(anyString());
doReturn(VorgangWithEingangTestFactory.create()).when(exportVorgangService).getVorgang(anyString());
doReturn(List.of(createOzgFile())).when(exportFileService).getAllPdfs(anyString());
doNothing().when(exportFileService).writeOzgFile(any(), any());
}
@Test
void shouldNotThrowException() {
assertDoesNotThrow(() -> exportService.writeExport(UUID.randomUUID().toString(), UUID.randomUUID().toString(), outputStream));
assertDoesNotThrow(() -> exportService.writeExport(UUID.randomUUID().toString(), UUID.randomUUID().toString(), new ByteArrayOutputStream()));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment