test improvements for new features
This commit is contained in:
parent
1a3e10a04e
commit
daadcf09c7
@ -45,7 +45,6 @@ public class ManualRedactionEntryEntity {
|
||||
@Column
|
||||
private OffsetDateTime softDeletedTime;
|
||||
|
||||
|
||||
@ElementCollection
|
||||
private List<RectangleEntity> positions = new ArrayList<>();
|
||||
|
||||
|
||||
@ -42,15 +42,22 @@ public class FileTesterAndProvider {
|
||||
@SneakyThrows
|
||||
public FileModel testAndProvideFile(Dossier dossier) {
|
||||
|
||||
return testAndProvideFile(dossier, "test.pdf");
|
||||
}
|
||||
|
||||
BinaryFileRequest upload = new BinaryFileRequest("test".getBytes(StandardCharsets.UTF_8), "test.pdf", dossier.getId(), "1");
|
||||
|
||||
@SneakyThrows
|
||||
public FileModel testAndProvideFile(Dossier dossier, String fileName) {
|
||||
|
||||
|
||||
BinaryFileRequest upload = new BinaryFileRequest("test".getBytes(StandardCharsets.UTF_8), fileName, dossier.getId(), "1");
|
||||
JSONPrimitive<String> uploadResult = uploadClient.upload(upload);
|
||||
|
||||
var file = fileClient.getFileStatus(dossier.getId(), uploadResult.getValue());
|
||||
|
||||
assertThat(file.getId()).isNotBlank();
|
||||
|
||||
assertThat(fileClient.getDossierStatus(dossier.getId()).size()).isEqualTo(1);
|
||||
assertThat(fileClient.getDossierStatus(dossier.getId()).size()).isGreaterThanOrEqualTo(1);
|
||||
|
||||
fileManagementStorageService.storeObject(dossier.getId(), file.getId(), FileType.REDACTION_LOG, objectMapper.writeValueAsBytes(new RedactionLog(1, List.of(RedactionLogEntry.builder().id("annotationId").type("manual").value("value").build()),
|
||||
null, 0, 0, 0, 0)));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user