From f33d767985139c331076c3a23cbb591333c8cee2 Mon Sep 17 00:00:00 2001 From: Enrico Date: Thu, 16 Nov 2023 11:04:36 +0100 Subject: [PATCH] fix: Fix local failing test --- .../hooks/EnrollmentAttributeValidationHookTest.java | 3 +++ .../hooks/TrackedEntityAttributeValidationHookTest.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/validation/hooks/EnrollmentAttributeValidationHookTest.java b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/validation/hooks/EnrollmentAttributeValidationHookTest.java index 7c0b014462f3..bd3a089ed9e6 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/validation/hooks/EnrollmentAttributeValidationHookTest.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/validation/hooks/EnrollmentAttributeValidationHookTest.java @@ -54,6 +54,7 @@ import org.hisp.dhis.tracker.preheat.TrackerPreheat; import org.hisp.dhis.tracker.report.TrackerErrorCode; import org.hisp.dhis.tracker.validation.ValidationErrorReporter; +import org.hisp.dhis.tracker.validation.service.attribute.TrackedAttributeValidationService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -72,6 +73,8 @@ class EnrollmentAttributeValidationHookTest { @InjectMocks private EnrollmentAttributeValidationHook hookToTest; + @Mock private TrackedAttributeValidationService teAttrService; + @Mock private Enrollment enrollment; @Mock private Program program; diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/validation/hooks/TrackedEntityAttributeValidationHookTest.java b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/validation/hooks/TrackedEntityAttributeValidationHookTest.java index 8a3312cd3c07..9afc2ff9d958 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/validation/hooks/TrackedEntityAttributeValidationHookTest.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/validation/hooks/TrackedEntityAttributeValidationHookTest.java @@ -56,6 +56,7 @@ import org.hisp.dhis.tracker.report.TrackerErrorCode; import org.hisp.dhis.tracker.util.Constant; import org.hisp.dhis.tracker.validation.ValidationErrorReporter; +import org.hisp.dhis.tracker.validation.service.attribute.TrackedAttributeValidationService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -74,6 +75,8 @@ class TrackedEntityAttributeValidationHookTest { @InjectMocks private TrackedEntityAttributeValidationHook trackedEntityAttributeValidationHook; + @Mock private TrackedAttributeValidationService teAttrService; + @Mock private TrackerPreheat preheat; @Mock private DhisConfigurationProvider dhisConfigurationProvider;