Skip to content

Commit 45627d8

Browse files
authored
Merge pull request #13524 from SORMAS-Foundation/task-#13516_automated_tests_multiple_tests_are_failing
Task #13516 automated tests multiple tests are failing
2 parents 2a5d7b6 + 785cdef commit 45627d8

2 files changed

Lines changed: 28 additions & 22 deletions

File tree

sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseClassificationLogicTest.java

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ public void ruleOutFalsePositivesForEVD() {
181181
Disease.EVD,
182182
PathogenTestType.IGM_SERUM_ANTIBODY,
183183
PathogenTestType.PCR_RT_PCR,
184-
PathogenTestType.ISOLATION);
184+
PathogenTestType.ISOLATION,
185+
PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
185186
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
186187
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
187188
}
@@ -259,7 +260,7 @@ public void ruleOutFalsePositivesForCSM() {
259260
// Confirmed
260261
caze = buildSuspectCase(Disease.CSM);
261262
caze = getCaseFacade().save(caze);
262-
createSampleTestsForAllTestTypesExcept(caze, Disease.CSM, PathogenTestType.ISOLATION);
263+
createSampleTestsForAllTestTypesExcept(caze, Disease.CSM, PathogenTestType.ISOLATION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
263264
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
264265
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
265266
}
@@ -400,7 +401,8 @@ public void ruleOutFalsePositivesForLassa() {
400401
Disease.LASSA,
401402
PathogenTestType.IGM_SERUM_ANTIBODY,
402403
PathogenTestType.PCR_RT_PCR,
403-
PathogenTestType.ISOLATION);
404+
PathogenTestType.ISOLATION,
405+
PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
404406
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
405407
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
406408
}
@@ -501,7 +503,7 @@ public void ruleOutFalsePositivesForYellowFever() {
501503
caze.setVaccinationStatus(VaccinationStatus.VACCINATED);
502504
createImmunizationWithVaccination(caze, DateHelper.subtractDays(new Date(), 1));
503505
caze = getCaseFacade().save(caze);
504-
createSampleTestsForAllTestTypesExcept(caze, Disease.YELLOW_FEVER, PathogenTestType.HISTOPATHOLOGY);
506+
createSampleTestsForAllTestTypesExcept(caze, Disease.YELLOW_FEVER, PathogenTestType.HISTOPATHOLOGY, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
505507
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
506508
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
507509
caze.setOutcome(CaseOutcome.NO_OUTCOME);
@@ -519,7 +521,8 @@ public void ruleOutFalsePositivesForYellowFever() {
519521
PathogenTestType.NEUTRALIZING_ANTIBODIES,
520522
PathogenTestType.PCR_RT_PCR,
521523
PathogenTestType.ANTIGEN_DETECTION,
522-
PathogenTestType.ISOLATION);
524+
PathogenTestType.ISOLATION,
525+
PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
523526
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
524527
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
525528
creator.createPathogenTest(caze, Disease.YELLOW_FEVER, PathogenTestType.IGM_SERUM_ANTIBODY, PathogenTestResultType.POSITIVE);
@@ -636,7 +639,8 @@ public void ruleOutFalsePositivesForDengueFever() {
636639
Disease.DENGUE,
637640
PathogenTestType.IGM_SERUM_ANTIBODY,
638641
PathogenTestType.PCR_RT_PCR,
639-
PathogenTestType.ISOLATION);
642+
PathogenTestType.ISOLATION,
643+
PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
640644
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
641645
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
642646
creator.createPathogenTest(caze, Disease.DENGUE, PathogenTestType.IGM_SERUM_ANTIBODY, PathogenTestResultType.POSITIVE);
@@ -750,7 +754,8 @@ public void ruleOutFalsePositivesForNewFlu() {
750754
Disease.NEW_INFLUENZA,
751755
PathogenTestType.ISOLATION,
752756
PathogenTestType.PCR_RT_PCR,
753-
PathogenTestType.NEUTRALIZING_ANTIBODIES);
757+
PathogenTestType.NEUTRALIZING_ANTIBODIES,
758+
PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
754759
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
755760
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
756761
}
@@ -817,7 +822,7 @@ public void ruleOutFalsePositivesForMeasles() {
817822
// Confirmed
818823
caze = buildSuspectCase(Disease.MEASLES);
819824
caze = getCaseFacade().save(caze);
820-
createSampleTestsForAllTestTypesExcept(caze, Disease.MEASLES, PathogenTestType.IGM_SERUM_ANTIBODY);
825+
createSampleTestsForAllTestTypesExcept(caze, Disease.MEASLES, PathogenTestType.IGM_SERUM_ANTIBODY, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
821826
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
822827
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
823828
}
@@ -883,7 +888,7 @@ public void ruleOutFalsePositivesForCholera() {
883888

884889
// Confirmed
885890
caze = getCaseFacade().save(buildSuspectCase(Disease.CHOLERA));
886-
createSampleTestsForAllTestTypesExcept(caze, Disease.CHOLERA, PathogenTestType.ISOLATION);
891+
createSampleTestsForAllTestTypesExcept(caze, Disease.CHOLERA, PathogenTestType.ISOLATION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
887892
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
888893
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
889894
}
@@ -936,7 +941,7 @@ public void ruleOutFalsePositivesForMonkeypox() {
936941
Disease.MONKEYPOX,
937942
PathogenTestType.ISOLATION,
938943
PathogenTestType.PCR_RT_PCR,
939-
PathogenTestType.IGM_SERUM_ANTIBODY);
944+
PathogenTestType.IGM_SERUM_ANTIBODY, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
940945
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
941946
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
942947
}
@@ -1040,7 +1045,7 @@ public void ruleOutFalsePositivesForPlague() {
10401045
Disease.PLAGUE,
10411046
PathogenTestType.ANTIGEN_DETECTION,
10421047
PathogenTestType.ISOLATION,
1043-
PathogenTestType.PCR_RT_PCR);
1048+
PathogenTestType.PCR_RT_PCR, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
10441049
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
10451050
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
10461051
}
@@ -1117,7 +1122,7 @@ public void ruleOutFalsePositivesForIMI() {
11171122
Disease.INVASIVE_MENINGOCOCCAL_INFECTION,
11181123
PathogenTestType.MICROSCOPY,
11191124
PathogenTestType.PCR_RT_PCR,
1120-
PathogenTestType.ANTIGEN_DETECTION);
1125+
PathogenTestType.ANTIGEN_DETECTION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
11211126
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
11221127
assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification());
11231128

@@ -1130,7 +1135,7 @@ public void ruleOutFalsePositivesForIMI() {
11301135
Disease.INVASIVE_MENINGOCOCCAL_INFECTION,
11311136
PathogenTestType.MICROSCOPY,
11321137
PathogenTestType.PCR_RT_PCR,
1133-
PathogenTestType.ANTIGEN_DETECTION);
1138+
PathogenTestType.ANTIGEN_DETECTION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
11341139
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
11351140
assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification());
11361141
}
@@ -1215,7 +1220,7 @@ public void ruleOutFalsePositivesForIPI() {
12151220
Disease.INVASIVE_PNEUMOCOCCAL_INFECTION,
12161221
PathogenTestType.PCR_RT_PCR,
12171222
PathogenTestType.CULTURE,
1218-
PathogenTestType.SEQUENCING);
1223+
PathogenTestType.SEQUENCING, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
12191224
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
12201225
assertEquals(CaseClassification.NOT_CLASSIFIED, caze.getCaseClassification());
12211226
}
@@ -1255,7 +1260,7 @@ public void testFulfilledReferenceDefinitionGermanServer() {
12551260
MockProducer.getProperties().setProperty(ConfigFacadeEjb.COUNTRY_LOCALE, "de");
12561261
CaseDataDto caze = buildSuspectCase(Disease.CORONAVIRUS);
12571262
caze = getCaseFacade().save(caze);
1258-
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION);
1263+
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION,PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
12591264
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
12601265
assertEquals(CaseReferenceDefinition.FULFILLED, caze.getCaseReferenceDefinition());
12611266
}
@@ -1267,7 +1272,7 @@ public void testFulfilledReferenceDefinitionGermanServerUnknownSymptoms1() {
12671272
caze.getSymptoms().setCough(null);
12681273
caze.getSymptoms().setChillsSweats(SymptomState.YES);
12691274
caze = getCaseFacade().save(caze);
1270-
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION);
1275+
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
12711276
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
12721277
assertEquals(CaseClassification.CONFIRMED_UNKNOWN_SYMPTOMS, caze.getCaseClassification());
12731278
assertEquals(CaseReferenceDefinition.FULFILLED, caze.getCaseReferenceDefinition());
@@ -1280,7 +1285,7 @@ public void testFulfilledReferenceDefinitionGermanServerUnknownSymptoms2() {
12801285
caze.getSymptoms().setCough(SymptomState.UNKNOWN);
12811286
caze.getSymptoms().setChillsSweats(SymptomState.YES);
12821287
caze = getCaseFacade().save(caze);
1283-
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION);
1288+
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
12841289
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
12851290
assertEquals(CaseClassification.CONFIRMED_UNKNOWN_SYMPTOMS, caze.getCaseClassification());
12861291
assertEquals(CaseReferenceDefinition.FULFILLED, caze.getCaseReferenceDefinition());
@@ -1294,7 +1299,7 @@ public void testFulfilledReferenceDefinitionGermanServerUnknownSymptoms3() {
12941299
caze.getSymptoms().setChillsSweats(SymptomState.YES);
12951300
caze.getSymptoms().setOxygenSaturationLower94(SymptomState.UNKNOWN);
12961301
caze = getCaseFacade().save(caze);
1297-
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION);
1302+
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
12981303
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
12991304
assertEquals(CaseClassification.CONFIRMED_UNKNOWN_SYMPTOMS, caze.getCaseClassification());
13001305
assertEquals(CaseReferenceDefinition.FULFILLED, caze.getCaseReferenceDefinition());
@@ -1307,7 +1312,7 @@ public void testFulfilledReferenceDefinitionGermanServerNoSymptoms1() {
13071312
caze.getSymptoms().setCough(null);
13081313
caze.getSymptoms().setChillsSweats(SymptomState.NO);
13091314
caze = getCaseFacade().save(caze);
1310-
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION);
1315+
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
13111316
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
13121317
assertEquals(CaseClassification.CONFIRMED_NO_SYMPTOMS, caze.getCaseClassification());
13131318
assertEquals(CaseReferenceDefinition.FULFILLED, caze.getCaseReferenceDefinition());
@@ -1320,7 +1325,7 @@ public void testFulfilledReferenceDefinitionGermanServerNoSymptoms2() {
13201325
caze.getSymptoms().setCough(SymptomState.NO);
13211326
caze.getSymptoms().setChillsSweats(SymptomState.YES);
13221327
caze = getCaseFacade().save(caze);
1323-
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION);
1328+
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
13241329
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
13251330
assertEquals(CaseClassification.CONFIRMED_NO_SYMPTOMS, caze.getCaseClassification());
13261331
assertEquals(CaseReferenceDefinition.FULFILLED, caze.getCaseReferenceDefinition());
@@ -1336,7 +1341,7 @@ public void testNotFulfilledReferenceDefinitionGermanServerCorrectPathogenTestes
13361341
Disease.CORONAVIRUS,
13371342
PathogenTestType.ISOLATION,
13381343
PathogenTestType.PCR_RT_PCR,
1339-
PathogenTestType.SEQUENCING);
1344+
PathogenTestType.SEQUENCING, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
13401345
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
13411346
assertEquals(CaseReferenceDefinition.NOT_FULFILLED, caze.getCaseReferenceDefinition());
13421347
}
@@ -1345,7 +1350,7 @@ public void testNotFulfilledReferenceDefinitionGermanServerCorrectPathogenTestes
13451350
public void testCalculationReferenceDefinitionNonGermanServer() {
13461351
CaseDataDto caze = buildSuspectCase(Disease.CORONAVIRUS);
13471352
caze = getCaseFacade().save(caze);
1348-
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION);
1353+
createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION, PathogenTestType.ANTIBIOTIC_SUSCEPTIBILITY);
13491354
caze = getCaseFacade().getCaseDataByUuid(caze.getUuid());
13501355
assertEquals(null, caze.getCaseReferenceDefinition());
13511356
}

sormas-ui/src/test/resources/META-INF/persistence.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
<class>de.symeda.sormas.backend.systemconfiguration.SystemConfigurationValue</class>
9696
<class>de.symeda.sormas.backend.systemconfiguration.SystemConfigurationCategory</class>
9797
<class>de.symeda.sormas.backend.person.notifier.Notifier</class>
98+
<class>de.symeda.sormas.backend.therapy.DrugSusceptibility</class>
9899

99100
<exclude-unlisted-classes>true</exclude-unlisted-classes>
100101

0 commit comments

Comments
 (0)