From 38eaa811520ec89cb72ae8d779739484ac3f3559 Mon Sep 17 00:00:00 2001 From: mojahidi Date: Fri, 12 Oct 2018 16:58:43 +0530 Subject: Increased UT coverage ActionManagerImplTest Increased UT coverage ActionManagerImplTest Change-Id: I554c8a148c1b5fef239035b05be267a5ec874ff6 Issue-ID: SDC-1673 Signed-off-by: mojahidi --- .../sdc/action/impl/ActionManagerImpl.java | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-action-manager/src/main/java') diff --git a/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java b/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java index 69a1024e1f..458883ebb0 100644 --- a/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java +++ b/openecomp-be/backend/openecomp-sdc-action-manager/src/main/java/org/openecomp/sdc/action/impl/ActionManagerImpl.java @@ -63,20 +63,28 @@ import static org.openecomp.sdc.versioning.dao.types.Version.VERSION_STRING_VIOL */ public class ActionManagerImpl implements ActionManager { - private static final ActionDao actionDao = ActionDaoFactory.getInstance().createInterface(); - private static final ActionVersioningManager versioningManager = - ActionVersioningManagerFactory.getInstance().createInterface(); - private static final ActionArtifactDao actionArtifactDao = - ActionArtifactDaoFactory.getInstance().createInterface(); - private static VersionInfoDao versionInfoDao = - VersionInfoDaoFactory.getInstance().createInterface(); + private final ActionDao actionDao; + private final ActionVersioningManager versioningManager; + private final ActionArtifactDao actionArtifactDao; + private final VersionInfoDao versionInfoDao; private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName()); public ActionManagerImpl() { + actionDao = ActionDaoFactory.getInstance().createInterface(); + versioningManager = ActionVersioningManagerFactory.getInstance().createInterface(); + actionArtifactDao = ActionArtifactDaoFactory.getInstance().createInterface(); + versionInfoDao = VersionInfoDaoFactory.getInstance().createInterface(); actionDao.registerVersioning(ACTION_VERSIONABLE_TYPE); } + public ActionManagerImpl(ActionDao actionDao, ActionVersioningManager versioningManager, + ActionArtifactDao actionArtifactDao, VersionInfoDao versionInfoDao) { + this.actionDao = actionDao; + this.versioningManager = versioningManager; + this.actionArtifactDao = actionArtifactDao; + this.versionInfoDao = versionInfoDao; + } /** * List All Major, Last Minor and Candidate version (if any) for Given Action Invariant UUID * -- cgit 1.2.3-korg