Merge branch 'RED-6929' into 'master'
RED-6929: fix acceptance tests/rules Closes RED-6929 See merge request redactmanager/redaction-service!13
This commit is contained in:
commit
b5bfa68b2d
@ -141,7 +141,7 @@ public class RedactionEntity {
|
||||
if (matchedRules.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
return matchedRules.getFirst();
|
||||
return matchedRules.getLast();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.iqser.red.service.redaction.v1.server.document.entity;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.iqser.red.service.redaction.v1.server.layoutparsing.document.graph.Boundary;
|
||||
import com.iqser.red.service.redaction.v1.server.layoutparsing.document.graph.entity.EntityType;
|
||||
import com.iqser.red.service.redaction.v1.server.layoutparsing.document.graph.entity.RedactionEntity;
|
||||
|
||||
public class RedactionEntityTest {
|
||||
|
||||
@Test
|
||||
public void testMatchedRule() {
|
||||
|
||||
RedactionEntity entity = RedactionEntity.initialEntityNode(new Boundary(1, 100), "PII", EntityType.ENTITY);
|
||||
entity.addMatchedRule("CBI.1.0");
|
||||
entity.addMatchedRule("CBI.2.0");
|
||||
entity.addMatchedRule("CBI.3.0");
|
||||
entity.addMatchedRule("CBI.4.0");
|
||||
assertThat(entity.getMatchedRule()).isEqualTo("CBI.4.0");
|
||||
assertThat(entity.getMatchedRuleUnit()).isEqualTo(4);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user