From 9512e9a04159b22c71fe3854ab6077f4200ef52a Mon Sep 17 00:00:00 2001 From: ezhil Date: Sat, 19 Jan 2019 17:59:37 +0530 Subject: Added test cases to AaiServiceImpl.java Change-Id: Ic3811991d3d6988537b3f2119a18092b9f6f8192 Issue-ID: CCSDK-963 Signed-off-by: ezhil --- .../apps/ms/neng/service/extinf/impl/AaiServiceImplTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ms') 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 8507bf65..f7d0bc28 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 @@ -48,14 +48,18 @@ 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"); - + Assert.assertTrue(aaiServiceImpl.validate("testUrl/","testName")); + } + @Test(expected= Exception.class) + public void testGetRestTemplate_Null() throws Exception { + aaiServiceImpl.setRestTemplate(null); + Assert.assertNotNull(aaiServiceImpl.getRestTemplate()); } } -- cgit 1.2.3-korg