From b4e062d341df62e2859ecb2293b11611f8a808a4 Mon Sep 17 00:00:00 2001 From: himeshr Date: Fri, 20 Sep 2024 10:40:07 +0530 Subject: [PATCH] #754 | Fix build breaks --- .../java/org/avni/server/service/MetadataDiffService.java | 2 ++ .../org/avni/server/service/MetadataDiffServiceTest.java | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/avni-server-api/src/main/java/org/avni/server/service/MetadataDiffService.java b/avni-server-api/src/main/java/org/avni/server/service/MetadataDiffService.java index 10348a2ab..b85cebdf9 100644 --- a/avni-server-api/src/main/java/org/avni/server/service/MetadataDiffService.java +++ b/avni-server-api/src/main/java/org/avni/server/service/MetadataDiffService.java @@ -2,6 +2,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; import com.fasterxml.jackson.databind.ObjectMapper; @@ -19,6 +20,7 @@ public class MetadataDiffService { private final MetadataDiffChecker diffChecker; private final MetadataDiffOutputGenerator outputGenerator; + @Autowired public MetadataDiffService(MetadataBundleAndFileHandler bundleAndFileHandler, MetadataDiffChecker diffChecker, MetadataDiffOutputGenerator outputGenerator) { this.bundleAndFileHandler = bundleAndFileHandler; this.diffChecker = diffChecker; diff --git a/avni-server-api/src/test/java/org/avni/server/service/MetadataDiffServiceTest.java b/avni-server-api/src/test/java/org/avni/server/service/MetadataDiffServiceTest.java index 53b5c1ebc..01deb6ce4 100644 --- a/avni-server-api/src/test/java/org/avni/server/service/MetadataDiffServiceTest.java +++ b/avni-server-api/src/test/java/org/avni/server/service/MetadataDiffServiceTest.java @@ -25,9 +25,9 @@ public class MetadataDiffServiceTest { @Before public void setUp() { - bundleAndFileHandler = mock(MetadataBundleAndFileHandler.class); - diffChecker = mock(MetadataDiffChecker.class); - outputGenerator = mock(MetadataDiffOutputGenerator.class); + bundleAndFileHandler = new MetadataBundleAndFileHandler(); + outputGenerator = new MetadataDiffOutputGenerator(); + diffChecker = new MetadataDiffChecker(outputGenerator); metadataDiffService = new MetadataDiffService(bundleAndFileHandler, diffChecker, outputGenerator); }