diff options
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj')
2 files changed, 16 insertions, 15 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); } diff --git a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/ReportWrapperTest.java b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/ReportWrapperTest.java index de3f4fff..073a413d 100644 --- a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/ReportWrapperTest.java +++ b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/xmlobj/ReportWrapperTest.java @@ -79,6 +79,7 @@ import org.owasp.esapi.ESAPI; import org.owasp.esapi.Encoder; import org.owasp.esapi.codecs.Codec; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -86,6 +87,7 @@ import org.powermock.modules.junit4.PowerMockRunner; @PrepareForTest({ AppConstants.class, Globals.class, AppUtils.class, DataCache.class, DbUtils.class, DataSet.class, ReportLoader.class, ReportRuntime.class, Utils.class, ESAPI.class, Codec.class, SecurityCodecUtil.class, ConnectionUtils.class, XSSFilter.class, ReportDefinition.class, UserUtils.class, ReportWrapper.class }) +@PowerMockIgnore("javax.management.*") public class ReportWrapperTest { MockitoTestSuite mockitoTestSuite = new MockitoTestSuite(); @@ -1721,4 +1723,4 @@ public class ReportWrapperTest { } -}
\ No newline at end of file +} |