diff options
author | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-03-18 20:07:39 +0200 |
---|---|---|
committer | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-03-18 20:07:39 +0200 |
commit | 545434fd679fa918288b913a6525d2e05777b22a (patch) | |
tree | 43c3af6f76a3d6a1a3cebebac082943ae879c19b /vid-app-common/src/test/java/org/onap/vid/mso/RestMsoImplementationTest.java | |
parent | 8fdf2dee7684f4911a58a2350626300af52b6e4d (diff) |
Unit tests
Change-Id: I43cd9c20e5576a63a0d0f9e78a91c27fcf32b2ad
Issue-ID: VID-197
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src/test/java/org/onap/vid/mso/RestMsoImplementationTest.java')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/mso/RestMsoImplementationTest.java | 112 |
1 files changed, 100 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 a3fa7bca3..3bcc01d63 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 |