diff options
author | 2018-02-14 09:39:22 +0530 | |
---|---|---|
committer | 2018-02-18 19:44:22 +0000 | |
commit | 04c1754116920f5b43b20f449a39cbfa7a681102 (patch) | |
tree | 805a48420c86466c82eace500d5edc6531e1f554 /openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test | |
parent | 1f79fe6cf0abafc9db0a99f4c9fbd661a5d87b32 (diff) |
Onboarding foundation changes for ItemManager
Resolved conflicting changes
1. Split ItemManager to ASDCItemManager and ItemManager
2. ItemManager provides basic capability of item without collaboration
3. AsdcItemManager provides all capabilities of item including
collaboration which are required by onboarding
4. ItemManager can be used by other services like activity spec to
create a basic item without collaboration features.
Change-Id: I6c6dc34a2b1a1745c796099b70e359432e90f85e
Issue-ID: SDC-1039
Signed-off-by: sheetalm <sheetal.mudholkar@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/AsdcItemManagerImplTest.java (renamed from openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/ItemManagerImplTest.java) | 4 | ||||
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/ItemManagerImplTest.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/AsdcItemManagerImplTest.java index 95c38e46e4..92d1e7f719 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/ItemManagerImplTest.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/AsdcItemManagerImplTest.java @@ -25,7 +25,7 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; -public class ItemManagerImplTest { +public class AsdcItemManagerImplTest { private static final String USER = "user1"; private static final String ITEM_ID = "item1"; @@ -40,7 +40,7 @@ public class ItemManagerImplTest { @Mock private SubscriptionService subscriptionService; @InjectMocks - private ItemManagerImpl itemManager; + private AsdcItemManagerImpl itemManager; @BeforeMethod public void setUp() throws Exception { diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java index 4f8c682c5e..5225f0e644 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java @@ -20,12 +20,13 @@ package org.openecomp.sdc.versioning.impl; - import org.mockito.ArgumentCaptor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.openecomp.sdc.common.errors.CoreException; +import org.openecomp.sdc.versioning.ActionVersioningManager; +import org.openecomp.sdc.versioning.AsdcItemManager; import org.openecomp.sdc.versioning.ItemManager; import org.openecomp.sdc.versioning.VersionCalculator; import org.openecomp.sdc.versioning.dao.VersionDao; @@ -66,7 +67,7 @@ public class VersioningManagerImplTest { @Mock private VersionCalculator versionCalculatorMock; @Mock - private ItemManager itemManagerMock; + private ItemManager asdcItemManager; @InjectMocks private VersioningManagerImpl versioningManager; @@ -169,7 +170,7 @@ public class VersioningManagerImplTest { Assert.assertEquals(version.getName(), versionName); verify(versionDaoMock).create(ITEM_ID, requestedVersion); - verify(itemManagerMock).updateVersionStatus(ITEM_ID, Draft, null); + verify(asdcItemManager).updateVersionStatus(ITEM_ID, Draft, null); verify(versionDaoMock) .publish(eq(ITEM_ID), eq(requestedVersion), eq("Create version: versionName")); } @@ -198,7 +199,7 @@ public class VersioningManagerImplTest { Assert.assertEquals(version.getName(), versionName); verify(versionDaoMock).create(ITEM_ID, requestedVersion); - verify(itemManagerMock).updateVersionStatus(ITEM_ID, Draft, null); + verify(asdcItemManager).updateVersionStatus(ITEM_ID, Draft, null); verify(versionDaoMock).publish(eq(ITEM_ID), eq(requestedVersion), eq("Create version: 4.0")); } @@ -250,7 +251,7 @@ public class VersioningManagerImplTest { verify(versionDaoMock).update(eq(ITEM_ID), versionArgumentCaptor.capture()); Assert.assertEquals(Certified, versionArgumentCaptor.getValue().getStatus()); verify(versionDaoMock).publish(ITEM_ID, version, submitDescription); - verify(itemManagerMock).updateVersionStatus(ITEM_ID, Certified, Draft); + verify(asdcItemManager).updateVersionStatus(ITEM_ID, Certified, Draft); } @Test |