- private PolicyVersion version;
- private String policyName = "com/Config_Test";
- private CommonClassDao commonClassDao;
- private List<Object> data = null;
-
- @Before
- public void setUp() throws Exception {
- PolicyController.setjUnit(true);
- PolicyController.setSmtpApplicationName("Test");
- PolicyController.setSmtpEmailExtension("test.com");
- PolicyController.setSmtpHost("test");
- PolicyController.setSmtpPort("23");
- PolicyController.setSmtpPassword("test");
- PolicyController.setSmtpUsername("test");
-
- version = new PolicyVersion();
- version.setPolicyName("com/Config_Test");
- version.setModifiedBy("xyz");
-
- WatchPolicyNotificationTable watch = new WatchPolicyNotificationTable();
- watch.setPolicyName("com/Config_Test");
- data = new ArrayList<>();
- data.add(watch);
-
- commonClassDao = mock(CommonClassDao.class);
- PolicyController.setCommonClassDao(commonClassDao);
- when(commonClassDao.getDataByQuery("from WatchPolicyNotificationTable where policyName like:policyFileName", null)).thenReturn(data);
- }
+ private PolicyVersion version;
+ private String policyName = "com/Config_Test";
+ private CommonClassDao commonClassDao;
+ private List<Object> data = null;