Fixed unittests
This commit is contained in:
parent
2cfa603f85
commit
f5f84948ee
@ -208,10 +208,6 @@ public class RedactionIntegrationTest {
|
|||||||
|
|
||||||
mockDictionaryCalls(null);
|
mockDictionaryCalls(null);
|
||||||
mockDictionaryCalls(0L);
|
mockDictionaryCalls(0L);
|
||||||
mockDictionaryCalls(1L);
|
|
||||||
mockDictionaryCalls(2L);
|
|
||||||
mockDictionaryCalls(3L);
|
|
||||||
mockDictionaryCalls(4L);
|
|
||||||
|
|
||||||
when(dictionaryClient.getColors(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(colors);
|
when(dictionaryClient.getColors(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(colors);
|
||||||
}
|
}
|
||||||
@ -566,17 +562,18 @@ public class RedactionIntegrationTest {
|
|||||||
dictionary.get(AUTHOR).add("report");
|
dictionary.get(AUTHOR).add("report");
|
||||||
reanlysisVersions.put("report", 2L);
|
reanlysisVersions.put("report", 2L);
|
||||||
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(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);
|
analyzeService.reanalyze(request);
|
||||||
|
|
||||||
dictionary.get(AUTHOR).add("assessment report");
|
dictionary.get(AUTHOR).add("assessment report");
|
||||||
reanlysisVersions.put("assessment report", 3L);
|
reanlysisVersions.put("assessment report", 3L);
|
||||||
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(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);
|
analyzeService.reanalyze(request);
|
||||||
|
|
||||||
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(3L);
|
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);
|
analyzeService.reanalyze(request);
|
||||||
|
|
||||||
var redactionLog = redactionStorageService.getRedactionLog(TEST_DOSSIER_ID, TEST_FILE_ID);
|
var redactionLog = redactionStorageService.getRedactionLog(TEST_DOSSIER_ID, TEST_FILE_ID);
|
||||||
@ -660,6 +657,7 @@ public class RedactionIntegrationTest {
|
|||||||
|
|
||||||
dictionary.get(AUTHOR).add("properties");
|
dictionary.get(AUTHOR).add("properties");
|
||||||
reanlysisVersions.put("properties", 1L);
|
reanlysisVersions.put("properties", 1L);
|
||||||
|
mockDictionaryCalls(0L);
|
||||||
|
|
||||||
dictionary.get(AUTHOR).add("physical");
|
dictionary.get(AUTHOR).add("physical");
|
||||||
reanlysisVersions.put("physical", 2L);
|
reanlysisVersions.put("physical", 2L);
|
||||||
@ -709,6 +707,7 @@ public class RedactionIntegrationTest {
|
|||||||
|
|
||||||
deleted.remove("mouse");
|
deleted.remove("mouse");
|
||||||
reanlysisVersions.put("mouse", 4L);
|
reanlysisVersions.put("mouse", 4L);
|
||||||
|
mockDictionaryCalls(3L);
|
||||||
|
|
||||||
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(4L);
|
when(dictionaryClient.getVersion(TEST_DOSSIER_TEMPLATE_ID)).thenReturn(4L);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user