summaryrefslogtreecommitdiffstats
path: root/ms/neng/src/test
diff options
context:
space:
mode:
authorezhil <ezhrajam@in.ibm.com>2019-01-19 17:59:37 +0530
committerezhil <ezhrajam@in.ibm.com>2019-01-19 18:06:04 +0530
commit9512e9a04159b22c71fe3854ab6077f4200ef52a (patch)
treeea09a7898e1d517b6e0fb0878032af699034d7bd /ms/neng/src/test
parent278ed8924d2d1e1a1b1bfc84b6d0408383c8c939 (diff)
Added test cases to AaiServiceImpl.java
Change-Id: Ic3811991d3d6988537b3f2119a18092b9f6f8192 Issue-ID: CCSDK-963 Signed-off-by: ezhil <ezhrajam@in.ibm.com>
Diffstat (limited to 'ms/neng/src/test')
-rw-r--r--ms/neng/src/test/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/AaiServiceImplTest.java10
1 files changed, 7 insertions, 3 deletions
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());
}
}