From 913a8c5b174cf95a0232fb377bcc060648297725 Mon Sep 17 00:00:00 2001 From: Chandan Ghosh Date: Fri, 1 Feb 2019 15:44:34 +0530 Subject: Added testcase for deleteOnboardApp service method Added testcase for deleteOnboardApp service method Issue-ID: MUSIC-305 Change-Id: I05a4a30cbff33bbc48f908b6e68086c7ed492a83 Signed-off-by: Chandan Ghosh --- .../rest/repository/impl/RestMusicAdminServiceImplTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/test/java') diff --git a/src/test/java/org/onap/music/rest/repository/impl/RestMusicAdminServiceImplTest.java b/src/test/java/org/onap/music/rest/repository/impl/RestMusicAdminServiceImplTest.java index 9b361aaa..1c238ff7 100644 --- a/src/test/java/org/onap/music/rest/repository/impl/RestMusicAdminServiceImplTest.java +++ b/src/test/java/org/onap/music/rest/repository/impl/RestMusicAdminServiceImplTest.java @@ -60,6 +60,9 @@ public class RestMusicAdminServiceImplTest { @Mock Iterator it; + @Mock + Row row; + @Mock ResultSet rs; JsonOnboard jsonObj=new JsonOnboard(); @@ -88,4 +91,12 @@ public class RestMusicAdminServiceImplTest { Mockito.when(restMusicAdminRepository.fetchOnboardedInfoSearch("AppName", "AID123", "false")).thenReturn(rs); Assert.assertNotNull(restMusicAdminServiceImpl.getOnboardedInfoSearch(jsonObj)); } + + @Test + public void deleteOnboardAppTest() throws Exception { + Mockito.when(row.getString("keyspace_name")).thenReturn("TBD"); + Mockito.when(rs.one()).thenReturn(row); + Mockito.when(restMusicAdminRepository.getKeySpaceNameFromKeySpaceMasterWithUuid("AID123")).thenReturn(rs); + Assert.assertNotNull(restMusicAdminServiceImpl.deleteOnboardApp(jsonObj)); + } } -- cgit 1.2.3-korg