Fixed unittests

This commit is contained in:
deiflaender 2022-03-14 14:06:49 +01:00
parent 2cfa603f85
commit f5f84948ee

View File

@ -208,10 +208,6 @@ public class RedactionIntegrationTest {
mockDictionaryCalls(null);
mockDictionaryCalls(0L);
mockDictionaryCalls(1L);
mockDictionaryCalls(2L);
mockDictionaryCalls(3L);
mockDictionaryCalls(4L);
when(dictionaryClient.getColors(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(colors);
}
@ -566,17 +562,18 @@ public class RedactionIntegrationTest {
dictionary.get(AUTHOR).add("report");
reanlysisVersions.put("report", 2L);
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(2L);
when(dictionaryClient.getDictionaryForType(AUTHOR + ":" + TEST_DOSSIER_TEMPLATE_ID, 2L)).thenReturn(getDictionaryResponse(AUTHOR, false));
mockDictionaryCalls(0L);
analyzeService.reanalyze(request);
dictionary.get(AUTHOR).add("assessment report");
reanlysisVersions.put("assessment report", 3L);
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(3L);
when(dictionaryClient.getDictionaryForType(AUTHOR + ":" + TEST_DOSSIER_TEMPLATE_ID, 3L)).thenReturn(getDictionaryResponse(AUTHOR, false));
mockDictionaryCalls(2L);
analyzeService.reanalyze(request);
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(3L);
when(dictionaryClient.getDictionaryForType(AUTHOR + ":" + TEST_DOSSIER_TEMPLATE_ID, 3L)).thenReturn(getDictionaryResponse(AUTHOR, false));
mockDictionaryCalls(3L);
analyzeService.reanalyze(request);
var redactionLog = redactionStorageService.getRedactionLog(TEST_DOSSIER_ID, TEST_FILE_ID);
@ -660,6 +657,7 @@ public class RedactionIntegrationTest {
dictionary.get(AUTHOR).add("properties");
reanlysisVersions.put("properties", 1L);
mockDictionaryCalls(0L);
dictionary.get(AUTHOR).add("physical");
reanlysisVersions.put("physical", 2L);
@ -709,6 +707,7 @@ public class RedactionIntegrationTest {
deleted.remove("mouse");
reanlysisVersions.put("mouse", 4L);
mockDictionaryCalls(3L);
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(4L);