Aharoni, Pavel (pa0916) | ca3cb01 | 2018-10-22 15:29:57 +0300 | [diff] [blame] | 1 | /*-
|
| 2 | * ============LICENSE_START=======================================================
|
| 3 | * OSAM Core
|
| 4 | * ================================================================================
|
| 5 | * Copyright (C) 2018 Netsia
|
| 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.external.aai;
|
| 24 |
|
| 25 | import org.junit.Before;
|
| 26 | import org.junit.Test;
|
| 27 | import org.junit.runner.RunWith;
|
| 28 | import org.onap.osam.external.aai.config.AaiConfig;
|
| 29 | import org.onap.osam.external.aai.model.PNF;
|
| 30 | import org.springframework.beans.factory.annotation.Autowired;
|
| 31 | import org.springframework.boot.test.context.SpringBootTest;
|
| 32 | import org.springframework.test.context.ContextConfiguration;
|
| 33 | import org.springframework.test.context.junit4.SpringRunner;
|
| 34 |
|
| 35 | /**
|
| 36 | * Created by cemturker on 01.10.2018.
|
| 37 | */
|
| 38 |
|
| 39 | @RunWith(SpringRunner.class)
|
| 40 | @SpringBootTest
|
| 41 | @ContextConfiguration(classes = {AaiConfig.class, AaiClientImpl.class})
|
| 42 | public class AaiClientTestIT {
|
| 43 |
|
| 44 | @Autowired
|
| 45 | private AaiClient aaiClient;
|
| 46 |
|
| 47 | @Before
|
| 48 | public void preProcess(){
|
| 49 | }
|
| 50 |
|
| 51 | @Test
|
| 52 | public void aaiQueryTest(){
|
| 53 | try {
|
| 54 | //PNF pnf = aaiClient.queryPnf("1111");
|
| 55 | }catch (Exception e) {
|
| 56 | e.printStackTrace();
|
| 57 | }
|
| 58 | }
|
| 59 |
|
| 60 | @Test
|
| 61 | public void aaiPutTest(){
|
| 62 | try {
|
| 63 | PNF pnf = new PNF();
|
| 64 | pnf.setPnfId("111");
|
| 65 | pnf.setPnfName("1111");
|
| 66 | pnf.setIpaddressV4Oam("192.168.61.24");
|
| 67 | //pnf = aaiClient.putPnf(pnf);
|
| 68 | }catch (Exception e) {
|
| 69 | e.printStackTrace();
|
| 70 | }
|
| 71 | }
|
| 72 |
|
| 73 | }
|