From b57a4a2db3fb8090004dd5f3babd0d7786312730 Mon Sep 17 00:00:00 2001 From: deiflaender Date: Fri, 24 Jul 2020 10:45:04 +0200 Subject: [PATCH] Use Hint in IntegrationTest --- .../v1/server/RedactionIntegrationTest.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/redaction-service-v1/redaction-service-server-v1/src/test/java/com/iqser/red/service/redaction/v1/server/RedactionIntegrationTest.java b/redaction-service-v1/redaction-service-server-v1/src/test/java/com/iqser/red/service/redaction/v1/server/RedactionIntegrationTest.java index 01dd7485..2446864d 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/test/java/com/iqser/red/service/redaction/v1/server/RedactionIntegrationTest.java +++ b/redaction-service-v1/redaction-service-server-v1/src/test/java/com/iqser/red/service/redaction/v1/server/RedactionIntegrationTest.java @@ -70,6 +70,7 @@ public class RedactionIntegrationTest { private final Map> dictionary = new HashMap<>(); private final Map typeColorMap = new HashMap<>(); + private final Map hintTypeMap = new HashMap<>(); @TestConfiguration public static class RedactionIntegrationTestConfiguration { @@ -149,6 +150,12 @@ public class RedactionIntegrationTest { typeColorMap.put(NAME_CODE, new float[]{1, 1, 0}); typeColorMap.put(NO_REDACTION_INDICATOR, new float[]{1, 0.502f, 0}); typeColorMap.put(DEFAULT, new float[]{1, 0.502f, 0}); + + hintTypeMap.put(VERTEBRATES_CODE, true); + hintTypeMap.put(ADDRESS_CODE, false); + hintTypeMap.put(NAME_CODE, false); + hintTypeMap.put(NO_REDACTION_INDICATOR, true); + hintTypeMap.put(DEFAULT, true); } @@ -156,14 +163,17 @@ public class RedactionIntegrationTest { return typeColorMap.entrySet() .stream() - .map(typeColor -> TypeResult.builder().type(typeColor.getKey()).color(typeColor.getValue()).build()) + .map(typeColor -> TypeResult.builder() + .type(typeColor.getKey()) + .color(typeColor.getValue()) + .isHint(hintTypeMap.get(typeColor.getKey())).build()) .collect(Collectors.toList()); } private DictionaryResponse getDictionaryResponse(String type) { - return DictionaryResponse.builder().color(typeColorMap.get(type)).entries(dictionary.get(type)).build(); + return DictionaryResponse.builder().color(typeColorMap.get(type)).entries(dictionary.get(type)).isHint(hintTypeMap.get(type)).build(); }