diff options
Diffstat (limited to 'ms/neng/src')
2 files changed, 18 insertions, 2 deletions
diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java index 6c4ae889..7356c3bd 100644 --- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java +++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImpl.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (C) 2018 IBM. + * ================================================================================ * 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 @@ -125,4 +127,8 @@ public class AaiServiceImpl { } return this.restTemplate; } + + public void setAaiProps(AaiProps aaiProps) { + this.aaiProps = aaiProps; + } } diff --git a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImplTest.java b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImplTest.java index b25de210..8507bf65 100644 --- a/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImplTest.java +++ b/ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImplTest.java @@ -4,8 +4,6 @@ * ================================================================================ * Copyright (C) 2018 IBM. * ================================================================================ - * Modifications Copyright (C) 2018 IBM. - * ================================================================================ * 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 @@ -26,7 +24,9 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.onap.ccsdk.apps.ms.neng.core.resource.model.AaiResponse; +import org.onap.ccsdk.apps.ms.neng.extinf.props.AaiProps; import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.web.client.RestTemplate; public class AaiServiceImplTest { private AaiServiceImpl aaiServiceImpl; @@ -48,4 +48,14 @@ public class AaiServiceImplTest { AaiResponse aaiResponse = aaiServiceImpl.buildResponse(true); Assert.assertEquals(aaiResponse.isRecFound(), true); } + + @Test(expected= Exception.class) + public void testValidate() throws Exception { + AaiProps aaiProps=new AaiProps(); + aaiProps.setUriBase("http://"); + aaiServiceImpl.setAaiProps(aaiProps); + aaiServiceImpl.setRestTemplate(new RestTemplate()); + aaiServiceImpl.validate("testUrl/","testName"); + + } } |