From e2b2ebadd1038a72157bd67312307aa19acd933c Mon Sep 17 00:00:00 2001 From: uj426b Date: Tue, 20 Feb 2018 17:19:00 -0500 Subject: Added Junits for POLICY-SDK-APP controllers Issue-ID: POLICY-584 Change-Id: I306f3484f466accf11ca4fd59864a4b402dcb733 Signed-off-by: uj426b --- .../org/onap/policy/controller/DashboardController.java | 13 ++++++++++--- .../org/onap/policy/controller/PolicyRolesController.java | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'POLICY-SDK-APP/src/main/java/org/onap') diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DashboardController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DashboardController.java index adb91ec27..d1483a223 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DashboardController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DashboardController.java @@ -74,12 +74,19 @@ import com.fasterxml.jackson.databind.ObjectMapper; @RequestMapping({"/"}) public class DashboardController extends RestrictedBaseController{ private static final Logger policyLogger = FlexLogger.getLogger(DashboardController.class); - @Autowired - SystemLogDbDao systemDAO; - @Autowired CommonClassDao commonClassDao; + + @Autowired + SystemLogDbDao systemDAO; + public void setCommonClassDao(CommonClassDao commonClassDao) { + this.commonClassDao = commonClassDao; + } + public void setSystemLogDbDao(SystemLogDbDao systemDAO){ + this.systemDAO = systemDAO; + } + private int pdpCount; private PDPGroupContainer pdpConatiner; private ArrayList pdpStatusData; diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyRolesController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyRolesController.java index 4b966154c..daf3d6c97 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyRolesController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/PolicyRolesController.java @@ -61,6 +61,10 @@ public class PolicyRolesController extends RestrictedBaseController{ @Autowired CommonClassDao commonClassDao; + public void setCommonClassDao(CommonClassDao commonClassDao) { + this.commonClassDao = commonClassDao; + } + List scopelist; @RequestMapping(value={"/get_RolesData"}, method={org.springframework.web.bind.annotation.RequestMethod.GET} , produces=MediaType.APPLICATION_JSON_VALUE) -- cgit 1.2.3-korg