diff options
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/mso')
3 files changed, 184 insertions, 12 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/RestMsoImplementationTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/RestMsoImplementationTest.java index a3fa7bca..3bcc01d6 100644 --- a/vid-app-common/src/test/java/org/onap/vid/mso/RestMsoImplementationTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/mso/RestMsoImplementationTest.java @@ -1,20 +1,108 @@ package org.onap.vid.mso; +import static org.junit.Assert.*; import org.junit.Test; +import org.onap.vid.changeManagement.RequestDetailsWrapper; + +import java.util.*; + +import javax.ws.rs.core.MultivaluedHashMap; + +import org.junit.Assert; public class RestMsoImplementationTest { - private RestMsoImplementation createTestSubject() { - return new RestMsoImplementation(); - } - -// @Test -// public void testInitMsoClient() throws Exception { -// RestMsoImplementation testSubject; -// -// // default test -// testSubject = createTestSubject(); -// testSubject.initMsoClient(); -// } + private RestMsoImplementation createTestSubject() { + return new RestMsoImplementation(); + } + + @Test + public void testInitMsoClient() throws Exception { + RestMsoImplementation testSubject; + MultivaluedHashMap<String, Object> result; + + // default test + try { + testSubject = createTestSubject(); + result = testSubject.initMsoClient(); + } catch (Exception e) { + } + } + + + @Test + public void testGetForObject() throws Exception { + RestMsoImplementation testSubject; + String sourceID = ""; + String path = ""; + + // default test + try { + testSubject = createTestSubject(); + testSubject.GetForObject(sourceID, path, null); + } catch (Exception e) { + } + } + + @Test + public void testDelete() throws Exception { + RestMsoImplementation testSubject; + String sourceID = ""; + String path = ""; + + // default test + try { + testSubject = createTestSubject(); + testSubject.Delete(null, null, sourceID, path, null); + } catch (Exception e) { + } + } + + @Test + public void testPostForObject() throws Exception { + RestMsoImplementation testSubject; + Object requestDetails = null; + String sourceID = ""; + String path = ""; + + // default test + try { + testSubject = createTestSubject(); + testSubject.PostForObject(requestDetails, sourceID, path, null); + } catch ( + + Exception e) { + } + } + + + + @Test + public void testPrepareClient() throws Exception { + RestMsoImplementation testSubject; + String path = ""; + String methodName = ""; + + // default test + try { + testSubject = createTestSubject(); + testSubject.prepareClient(path, methodName); + } catch ( + + Exception e) { + } + } + + + + + // @Test + // public void testInitMsoClient() throws Exception { + // RestMsoImplementation testSubject; + // + // // default test + // testSubject = createTestSubject(); + // testSubject.initMsoClient(); + // } }
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfoTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfoTest.java new file mode 100644 index 00000000..9e00a781 --- /dev/null +++ b/vid-app-common/src/test/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfoTest.java @@ -0,0 +1,44 @@ +package org.onap.vid.mso.model; + +import org.junit.Test; +import org.onap.vid.controllers.OperationalEnvironmentController; +import org.onap.vid.controllers.OperationalEnvironmentController.OperationalEnvironmentActivateBody; +import org.onap.vid.controllers.OperationalEnvironmentController.OperationalEnvironmentManifest; + +public class OperationalEnvironmentActivateInfoTest { + + private OperationalEnvironmentActivateInfo createTestSubject() { + OperationalEnvironmentController.OperationalEnvironmentActivateBody a = new OperationalEnvironmentActivateBody("a", "b", "c", new OperationalEnvironmentManifest()); + return new OperationalEnvironmentActivateInfo(a, "", ""); + } + + @Test + public void testGetUserId() throws Exception { + OperationalEnvironmentActivateInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUserId(); + } + + @Test + public void testGetOperationalEnvironmentId() throws Exception { + OperationalEnvironmentActivateInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getOperationalEnvironmentId(); + } + + @Test + public void testToString() throws Exception { + OperationalEnvironmentActivateInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } +}
\ No newline at end of file diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/model/OperationalEnvironmentDeactivateInfoTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/model/OperationalEnvironmentDeactivateInfoTest.java new file mode 100644 index 00000000..70ed02f3 --- /dev/null +++ b/vid-app-common/src/test/java/org/onap/vid/mso/model/OperationalEnvironmentDeactivateInfoTest.java @@ -0,0 +1,40 @@ +package org.onap.vid.mso.model; + +import org.junit.Test; + +public class OperationalEnvironmentDeactivateInfoTest { + + private OperationalEnvironmentDeactivateInfo createTestSubject() { + return new OperationalEnvironmentDeactivateInfo("", ""); + } + + @Test + public void testGetUserId() throws Exception { + OperationalEnvironmentDeactivateInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getUserId(); + } + + @Test + public void testGetOperationalEnvironmentId() throws Exception { + OperationalEnvironmentDeactivateInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.getOperationalEnvironmentId(); + } + + @Test + public void testToString() throws Exception { + OperationalEnvironmentDeactivateInfo testSubject; + String result; + + // default test + testSubject = createTestSubject(); + result = testSubject.toString(); + } +}
\ No newline at end of file |