diff options
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/RaptorControllerAsyncNewTest.java')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/RaptorControllerAsyncNewTest.java | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/RaptorControllerAsyncNewTest.java b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/RaptorControllerAsyncNewTest.java index f761733b..5b2da9ca 100644 --- a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/RaptorControllerAsyncNewTest.java +++ b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/RaptorControllerAsyncNewTest.java @@ -161,7 +161,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -241,7 +241,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -301,7 +301,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -370,7 +370,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -431,7 +431,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -467,7 +467,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -509,7 +509,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -572,7 +572,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -599,7 +599,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -836,7 +836,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -943,7 +943,7 @@ public class RaptorControllerAsyncNewTest { Mockito.when(rsmd.getColumnCount()).thenReturn(1); Mockito.when(rs.getMetaData()).thenReturn(rsmd); DataSet datset = PowerMockito.mock(DataSet.class); - Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyInt())).thenReturn(null); + Mockito.when(datset.getString(Matchers.anyInt(), Matchers.anyString())).thenReturn(null); Mockito.when(DbUtils.executeQuery(Matchers.anyString())).thenReturn(datset); Mockito.when(Globals.getNewScheduleData()).thenReturn("test"); CustomReportType customReportType = new CustomReportType(); @@ -1342,7 +1342,7 @@ public class RaptorControllerAsyncNewTest { public void retrieveDataForGivenQuery2Test() throws Exception { QueryJSON queryJSON = new QueryJSON(); - queryJSON.setQuery("select"); + queryJSON.setQuery("test"); ServletContext servletContext = PowerMockito.mock(ServletContext.class); Mockito.when(mockedRequest.getSession().getServletContext()).thenReturn(servletContext); ReportDefinition rdf1 = PowerMockito.mock(ReportDefinition.class); @@ -1378,8 +1378,7 @@ public class RaptorControllerAsyncNewTest { assertEquals(raptorControllerAsync.nvl("test"),"test"); assertEquals(raptorControllerAsync.nvl("","default"),"default"); assertEquals(raptorControllerAsync.nvl("test","default"),"test"); - - + raptorControllerAsync.retrieveDataForGivenQuery(false, queryJSON, mockedRequest, mockedResponse); } |