RED-8480: adjusted tests
This commit is contained in:
parent
bb3d6f5d74
commit
3a0ffaef72
@ -7,7 +7,7 @@ description = "redaction-service-api-v1"
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.springframework:spring-web:6.0.12")
|
implementation("org.springframework:spring-web:6.0.12")
|
||||||
implementation("com.iqser.red.service:persistence-service-internal-api-v1:RED-8480-2")
|
implementation("com.iqser.red.service:persistence-service-internal-api-v1:2.351.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
@ -16,7 +16,7 @@ val layoutParserVersion = "0.86.0"
|
|||||||
val jacksonVersion = "2.15.2"
|
val jacksonVersion = "2.15.2"
|
||||||
val droolsVersion = "9.44.0.Final"
|
val droolsVersion = "9.44.0.Final"
|
||||||
val pdfBoxVersion = "3.0.0"
|
val pdfBoxVersion = "3.0.0"
|
||||||
val persistenceServiceVersion = "RED-8480-2"
|
val persistenceServiceVersion = "2.351.0"
|
||||||
val springBootStarterVersion = "3.1.5"
|
val springBootStarterVersion = "3.1.5"
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
|
|||||||
@ -131,7 +131,7 @@ public class ManualChangeOverwrite {
|
|||||||
if (manualChange instanceof ManualRecategorization recategorization) {
|
if (manualChange instanceof ManualRecategorization recategorization) {
|
||||||
recategorized = true;
|
recategorized = true;
|
||||||
type = recategorization.getType();
|
type = recategorization.getType();
|
||||||
if (!recategorization.getLegalBasis().isEmpty()) {
|
if (recategorization.getLegalBasis() != null && !recategorization.getLegalBasis().isEmpty()) {
|
||||||
legalBasis = recategorization.getLegalBasis();
|
legalBasis = recategorization.getLegalBasis();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1236,6 +1236,7 @@ public class RedactionIntegrationTest extends AbstractRedactionIntegrationTest {
|
|||||||
.recategorizations(Set.of(ManualRecategorization.builder()
|
.recategorizations(Set.of(ManualRecategorization.builder()
|
||||||
.annotationId("3029651d0842a625f2d23f8375c23600")
|
.annotationId("3029651d0842a625f2d23f8375c23600")
|
||||||
.type("CBI_author")
|
.type("CBI_author")
|
||||||
|
.legalBasis("")
|
||||||
.requestDate(OffsetDateTime.now())
|
.requestDate(OffsetDateTime.now())
|
||||||
.fileId(TEST_FILE_ID)
|
.fileId(TEST_FILE_ID)
|
||||||
.build()))
|
.build()))
|
||||||
@ -1331,6 +1332,7 @@ public class RedactionIntegrationTest extends AbstractRedactionIntegrationTest {
|
|||||||
assertEquals(entityLog.getEntityLogEntry().stream().filter(entityLogEntry -> entityLogEntry.getId().equals(manualAddId2)).findFirst().get().getState(), EntryState.REMOVED);
|
assertEquals(entityLog.getEntityLogEntry().stream().filter(entityLogEntry -> entityLogEntry.getId().equals(manualAddId2)).findFirst().get().getState(), EntryState.REMOVED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public void testResizeWithUpdateDictionaryTrue() {
|
public void testResizeWithUpdateDictionaryTrue() {
|
||||||
@ -1364,12 +1366,7 @@ public class RedactionIntegrationTest extends AbstractRedactionIntegrationTest {
|
|||||||
|
|
||||||
private IdRemoval getIdRemoval(String id) {
|
private IdRemoval getIdRemoval(String id) {
|
||||||
|
|
||||||
return IdRemoval.builder()
|
return IdRemoval.builder().annotationId(id).removeFromAllDossiers(false).removeFromDictionary(false).requestDate(OffsetDateTime.now()).build();
|
||||||
.annotationId(id)
|
|
||||||
.removeFromAllDossiers(false)
|
|
||||||
.removeFromDictionary(false)
|
|
||||||
.requestDate(OffsetDateTime.now())
|
|
||||||
.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -115,7 +115,12 @@ public class ManualChangesUnitTest extends BuildDocumentIntegrationTest {
|
|||||||
assertEquals(legalBasis, entity.getManualOverwrite().getLegalBasis().orElse(entity.getMatchedRule().getLegalBasis()));
|
assertEquals(legalBasis, entity.getManualOverwrite().getLegalBasis().orElse(entity.getMatchedRule().getLegalBasis()));
|
||||||
assertEquals(section, entity.getManualOverwrite().getSection().orElse(entity.getDeepestFullyContainingNode().toString()));
|
assertEquals(section, entity.getManualOverwrite().getSection().orElse(entity.getDeepestFullyContainingNode().toString()));
|
||||||
|
|
||||||
ManualRecategorization imageRecategorizationRequest = ManualRecategorization.builder().type("type").requestDate(start.plusSeconds(5)).annotationId(annotationId).build();
|
ManualRecategorization imageRecategorizationRequest = ManualRecategorization.builder()
|
||||||
|
.type("type")
|
||||||
|
.requestDate(start.plusSeconds(5))
|
||||||
|
.annotationId(annotationId)
|
||||||
|
.legalBasis("")
|
||||||
|
.build();
|
||||||
entity.getManualOverwrite().addChange(imageRecategorizationRequest);
|
entity.getManualOverwrite().addChange(imageRecategorizationRequest);
|
||||||
assertTrue(entity.getManualOverwrite().getRecategorized().isPresent());
|
assertTrue(entity.getManualOverwrite().getRecategorized().isPresent());
|
||||||
assertTrue(entity.getManualOverwrite().getRecategorized().get());
|
assertTrue(entity.getManualOverwrite().getRecategorized().get());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user