Aharoni, Pavel (pa0916) | ca3cb01 | 2018-10-22 15:29:57 +0300 | [diff] [blame] | 1 | /*-
|
| 2 | * ============LICENSE_START=======================================================
|
| 3 | * OSAM
|
| 4 | * ================================================================================
|
| 5 | * Copyright (C) 2018 AT&T
|
| 6 | * ================================================================================
|
| 7 | * Licensed under the Apache License, Version 2.0 (the "License");
|
| 8 | * you may not use this file except in compliance with the License.
|
| 9 | * You may obtain a copy of the License at
|
| 10 | *
|
| 11 | * http://www.apache.org/licenses/LICENSE-2.0
|
| 12 | *
|
| 13 | * Unless required by applicable law or agreed to in writing, software
|
| 14 | * distributed under the License is distributed on an "AS IS" BASIS,
|
| 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 16 | * See the License for the specific language governing permissions and
|
| 17 | * limitations under the License.
|
| 18 | * ============LICENSE_END=========================================================
|
| 19 | */
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 | package org.onap.osam.mso;
|
| 24 |
|
| 25 | import org.junit.Test;
|
| 26 |
|
| 27 | import javax.ws.rs.core.MultivaluedHashMap;
|
| 28 |
|
| 29 | public class RestMsoImplementationTest {
|
| 30 |
|
| 31 | private RestMsoImplementation createTestSubject() {
|
| 32 | return new RestMsoImplementation();
|
| 33 | }
|
| 34 |
|
| 35 | @Test
|
| 36 | public void testInitMsoClient() throws Exception {
|
| 37 | RestMsoImplementation testSubject;
|
| 38 | MultivaluedHashMap<String, Object> result;
|
| 39 |
|
| 40 | // default test
|
| 41 | try {
|
| 42 | testSubject = createTestSubject();
|
| 43 | result = testSubject.initMsoClient();
|
| 44 | } catch (Exception e) {
|
| 45 | }
|
| 46 | }
|
| 47 |
|
| 48 |
|
| 49 | @Test
|
| 50 | public void testGetForObject() throws Exception {
|
| 51 | RestMsoImplementation testSubject;
|
| 52 | String sourceID = "";
|
| 53 | String path = "";
|
| 54 |
|
| 55 | // default test
|
| 56 | try {
|
| 57 | testSubject = createTestSubject();
|
| 58 | testSubject.GetForObject(sourceID, path, null);
|
| 59 | } catch (Exception e) {
|
| 60 | }
|
| 61 | }
|
| 62 |
|
| 63 | @Test
|
| 64 | public void testDelete() throws Exception {
|
| 65 | RestMsoImplementation testSubject;
|
| 66 | String sourceID = "";
|
| 67 | String path = "";
|
| 68 |
|
| 69 | // default test
|
| 70 | try {
|
| 71 | testSubject = createTestSubject();
|
| 72 | testSubject.Delete(null, null, sourceID, path, null);
|
| 73 | } catch (Exception e) {
|
| 74 | }
|
| 75 | }
|
| 76 |
|
| 77 | @Test
|
| 78 | public void testPostForObject() throws Exception {
|
| 79 | RestMsoImplementation testSubject;
|
| 80 | Object requestDetails = null;
|
| 81 | String sourceID = "";
|
| 82 | String path = "";
|
| 83 |
|
| 84 | // default test
|
| 85 | try {
|
| 86 | testSubject = createTestSubject();
|
| 87 | testSubject.PostForObject(requestDetails, sourceID, path, null);
|
| 88 | } catch (
|
| 89 |
|
| 90 | Exception e) {
|
| 91 | }
|
| 92 | }
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 | @Test
|
| 97 | public void testPrepareClient() throws Exception {
|
| 98 | RestMsoImplementation testSubject;
|
| 99 | String path = "";
|
| 100 | String methodName = "";
|
| 101 |
|
| 102 | // default test
|
| 103 | try {
|
| 104 | testSubject = createTestSubject();
|
| 105 | testSubject.prepareClient(path, methodName);
|
| 106 | } catch (
|
| 107 |
|
| 108 | Exception e) {
|
| 109 | }
|
| 110 | }
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 | // @Test
|
| 116 | // public void testInitMsoClient() throws Exception {
|
| 117 | // RestMsoImplementation testSubject;
|
| 118 | //
|
| 119 | // // default test
|
| 120 | // testSubject = createTestSubject();
|
| 121 | // testSubject.initMsoClient();
|
| 122 | // }
|
| 123 |
|
| 124 | }
|