mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-11 13:48:37 +02:00
Update PipelineProcessorTest.java
This commit is contained in:
parent
bf8a407c9c
commit
f4d7f3d0a0
@ -50,18 +50,21 @@ class PipelineProcessorTest {
|
|||||||
PipelineConfig config = new PipelineConfig();
|
PipelineConfig config = new PipelineConfig();
|
||||||
config.setOperations(List.of(op));
|
config.setOperations(List.of(op));
|
||||||
|
|
||||||
Resource file = new ByteArrayResource("data".getBytes()) {
|
Resource file =
|
||||||
@Override
|
new ByteArrayResource("data".getBytes()) {
|
||||||
public String getFilename() {
|
@Override
|
||||||
return "test.pdf";
|
public String getFilename() {
|
||||||
}
|
return "test.pdf";
|
||||||
};
|
}
|
||||||
|
};
|
||||||
|
|
||||||
List<Resource> files = List.of(file);
|
List<Resource> files = List.of(file);
|
||||||
|
|
||||||
when(apiDocService.isMultiInput("/api/v1/filter/filter-page-count")).thenReturn(false);
|
when(apiDocService.isMultiInput("/api/v1/filter/filter-page-count")).thenReturn(false);
|
||||||
when(apiDocService.getExtensionTypes(false, "/api/v1/filter/filter-page-count"))
|
when(apiDocService.getExtensionTypes(false, "/api/v1/filter/filter-page-count"))
|
||||||
.thenReturn(List.of("pdf"));
|
.thenReturn(List.of("pdf"));
|
||||||
|
when(apiDocService.isValidOperation(eq("/api/v1/filter/filter-page-count"), anyMap()))
|
||||||
|
.thenReturn(true);
|
||||||
|
|
||||||
doReturn(new ResponseEntity<>(new byte[0], HttpStatus.OK))
|
doReturn(new ResponseEntity<>(new byte[0], HttpStatus.OK))
|
||||||
.when(pipelineProcessor)
|
.when(pipelineProcessor)
|
||||||
|
Loading…
Reference in New Issue
Block a user