diff options
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/definition')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/definition/ReportScheduleTest.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/definition/ReportScheduleTest.java b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/definition/ReportScheduleTest.java index 0078f5ef..e3880ade 100644 --- a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/definition/ReportScheduleTest.java +++ b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/definition/ReportScheduleTest.java @@ -366,7 +366,9 @@ public class ReportScheduleTest { Mockito.when(resultSet.next()).thenReturn(true); Mockito.when(dataSet1.getRowCount()).thenReturn(0); - + RemDbInfo remDbInfo = Mockito.mock(RemDbInfo.class); + PowerMockito.whenNew(RemDbInfo.class).withNoArguments().thenReturn(remDbInfo); + reportSchedule.setRemDbInfo(remDbInfo); reportSchedule.setSchedEnabled("N"); reportSchedule.setConditionSQL("SELECT coalesce(cr.owner_id, cr.create_id) owner_id, cr.create_id, DATE_FORMAT(cr.create_date, '[Globals.getTimeFormat()]') create_date, maint_id, DATE_FORMAT(cr.maint_date, '[Globals.getTimeFormat()]') update_date, cr.menu_id, cr.menu_approved_yn FROM cr_report cr WHERE cr.rep_id= [reportID]"); @@ -486,6 +488,7 @@ public class ReportScheduleTest { reportSchedule.setSchedEnabled("N"); reportSchedule.setConditionSQL("SELECT WHEN FROM TABLE WHERE [test] ORDER BY"); + reportSchedule.setRemDbInfo(remDbInfo); reportSchedule.persistScheduleData(connection, httpServletRequest); } @@ -548,7 +551,7 @@ public class ReportScheduleTest { reportSchedule.setSchedEnabled("N"); reportSchedule.setConditionSQL("SELECT WHEN FROM TABLE WHERE [report_id] ORDER BY"); - + reportSchedule.setRemDbInfo(remDbInfo); reportSchedule.persistScheduleData(connection, httpServletRequest); } @@ -610,7 +613,7 @@ public class ReportScheduleTest { reportSchedule.setSchedEnabled("N"); reportSchedule.setConditionSQL("SELECT WHEN FROM TABLE WHERE [report_id] ORDER BY"); - + reportSchedule.setRemDbInfo(remDbInfo); reportSchedule.persistScheduleData(connection, httpServletRequest); } @@ -669,7 +672,7 @@ public class ReportScheduleTest { Mockito.when(resultSet.next()).thenReturn(true); Mockito.when(dataSet1.getRowCount()).thenReturn(0); - + reportSchedule.setRemDbInfo(remDbInfo); reportSchedule.setSchedEnabled("N"); reportSchedule.setConditionSQL("SELECT WHEN FROM TABLE WHERE [test] ORDER BY"); |