From 545434fd679fa918288b913a6525d2e05777b22a Mon Sep 17 00:00:00 2001 From: "Sonsino, Ofir (os0695)" Date: Sun, 18 Mar 2018 20:07:39 +0200 Subject: Unit tests Change-Id: I43cd9c20e5576a63a0d0f9e78a91c27fcf32b2ad Issue-ID: VID-197 Signed-off-by: Sonsino, Ofir (os0695) --- .../services/ChangeManagementServiceImplTest.java | 81 +++++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-) (limited to 'vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java') diff --git a/vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java index 85b88a0db..7819b4c9f 100644 --- a/vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/services/ChangeManagementServiceImplTest.java @@ -24,7 +24,8 @@ import org.springframework.web.multipart.MultipartFile; public class ChangeManagementServiceImplTest { private ChangeManagementServiceImpl createTestSubject() { - return new ChangeManagementServiceImpl(new DataAccessServiceImpl(), new MsoBusinessLogicImpl(new MsoRestClientNew())); + return new ChangeManagementServiceImpl(new DataAccessServiceImpl(), + new MsoBusinessLogicImpl(new MsoRestClientNew())); } @Test @@ -51,7 +52,6 @@ public class ChangeManagementServiceImplTest { Assert.assertEquals(null, result); } - @Test public void testGetSchedulerChangeManagements() throws Exception { ChangeManagementServiceImpl testSubject; @@ -72,7 +72,84 @@ public class ChangeManagementServiceImplTest { testSubject.deleteSchedule(scheduleId); } + @Test + public void testAddVnfWorkflowRelation() throws Exception { + ChangeManagementServiceImpl testSubject; + VnfWorkflowRelationRequest vnfWorkflowRelationRequest = null; + VnfWorkflowRelationResponse result; + + // default test + try { + testSubject = createTestSubject(); + result = testSubject.addVnfWorkflowRelation(vnfWorkflowRelationRequest); + } catch ( + + Exception e) { + } + } + + @Test + public void testDeleteVnfWorkflowRelation() throws Exception { + ChangeManagementServiceImpl testSubject; + VnfWorkflowRelationRequest vnfWorkflowRelationRequest = null; + VnfWorkflowRelationResponse result; + // default test + try { + testSubject = createTestSubject(); + result = testSubject.deleteVnfWorkflowRelation(vnfWorkflowRelationRequest); + } catch ( + + Exception e) { + } + } + + @Test + public void testGetAllVnfWorkflowRelations() throws Exception { + ChangeManagementServiceImpl testSubject; + VnfWorkflowRelationAllResponse result; + + // default test + try { + testSubject = createTestSubject(); + result = testSubject.getAllVnfWorkflowRelations(); + } catch ( + + Exception e) { + } + } + + @Test + public void testGetWorkflowsForVnf() throws Exception { + ChangeManagementServiceImpl testSubject; + GetVnfWorkflowRelationRequest getVnfWorkflowRelationRequest = null; + List result; + + // default test + try { + testSubject = createTestSubject(); + result = testSubject.getWorkflowsForVnf(getVnfWorkflowRelationRequest); + } catch ( + + Exception e) { + } + } + + @Test + public void testUploadConfigUpdateFile() throws Exception { + ChangeManagementServiceImpl testSubject; + MultipartFile file = null; + String result; + + // default test + try { + testSubject = createTestSubject(); + result = testSubject.uploadConfigUpdateFile(file); + } catch ( + + Exception e) { + } + } /* * TODO: fix private ChangeManagementServiceImpl createTestSubject() { -- cgit 1.2.3-korg