/*- | |
* ============LICENSE_START======================================================= | |
* OSAM Core | |
* ================================================================================ | |
* Copyright (C) 2018 Netsia | |
* ================================================================================ | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
* ============LICENSE_END========================================================= | |
*/ | |
package org.onap.osam.external.aai; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.onap.osam.external.aai.config.AaiConfig; | |
import org.onap.osam.external.aai.model.PNF; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.context.SpringBootTest; | |
import org.springframework.test.context.ContextConfiguration; | |
import org.springframework.test.context.junit4.SpringRunner; | |
/** | |
* Created by cemturker on 01.10.2018. | |
*/ | |
@RunWith(SpringRunner.class) | |
@SpringBootTest | |
@ContextConfiguration(classes = {AaiConfig.class, AaiClientImpl.class}) | |
public class AaiClientTestIT { | |
@Autowired | |
private AaiClient aaiClient; | |
@Before | |
public void preProcess(){ | |
} | |
@Test | |
public void aaiQueryTest(){ | |
try { | |
//PNF pnf = aaiClient.queryPnf("1111"); | |
}catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
@Test | |
public void aaiPutTest(){ | |
try { | |
PNF pnf = new PNF(); | |
pnf.setPnfId("111"); | |
pnf.setPnfName("1111"); | |
pnf.setIpaddressV4Oam("192.168.61.24"); | |
//pnf = aaiClient.putPnf(pnf); | |
}catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
} |