@Test public void testGetRiskTypeDictionaryEntityData() { when(commonClassDao.getData(RiskType.class)).thenReturn(new ArrayList<>()); controller.getRiskTypeDictionaryEntityData(response); try { assertTrue(response.getContentAsString() != null && response.getContentAsString().contains("riskTypeDictionaryDatas")); } catch (Exception e) { fail(); logger.error(e.getMessage(), e); } }
@RequestMapping( value = {"/get_RiskTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getRiskTypeDictionaryEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, riskTypeDatas, RiskType.class); }
SafePolicyController { @RequestMapping( value = {"/get_RiskTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getRiskTypeDictionaryEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, riskTypeDatas, RiskType.class); } }
SafePolicyController { @RequestMapping( value = {"/get_RiskTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getRiskTypeDictionaryEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, riskTypeDatas, RiskType.class); } @Autowired  SafePolicyController(CommonClassDao commonClassDao);  SafePolicyController(); }
SafePolicyController { @RequestMapping( value = {"/get_RiskTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getRiskTypeDictionaryEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, riskTypeDatas, RiskType.class); } @Autowired  SafePolicyController(CommonClassDao commonClassDao);  SafePolicyController(); void setCommonClassDao(CommonClassDao commonClassDao); @RequestMapping( value = {"/get_RiskTypeDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getRiskTypeDictionaryByNameEntityData(HttpServletResponse response); @RequestMapping( value = {"/get_RiskTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getRiskTypeDictionaryEntityData(HttpServletResponse response); @RequestMapping(value = {"/sp_dictionary/save_riskType"}, method = {RequestMethod.POST}) ModelAndView saveRiskTypeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/sp_dictionary/remove_riskType"}, method = {RequestMethod.POST}) void removeRiskTypeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_SafePolicyWarningDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getSafePolicyWarningEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_SafePolicyWarningData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getSafePolicyWarningeEntityData(HttpServletResponse response); @RequestMapping(value = {"/sp_dictionary/save_safePolicyWarning"}, method = {RequestMethod.POST}) ModelAndView saveSafePolicyWarningDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/sp_dictionary/remove_SafePolicyWarning"}, method = {RequestMethod.POST}) void removeSafePolicyWarningDictionary(HttpServletRequest request, HttpServletResponse response); }
SafePolicyController { @RequestMapping( value = {"/get_RiskTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) public void getRiskTypeDictionaryEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.getData(response, riskTypeDatas, RiskType.class); } @Autowired  SafePolicyController(CommonClassDao commonClassDao);  SafePolicyController(); void setCommonClassDao(CommonClassDao commonClassDao); @RequestMapping( value = {"/get_RiskTypeDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getRiskTypeDictionaryByNameEntityData(HttpServletResponse response); @RequestMapping( value = {"/get_RiskTypeData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getRiskTypeDictionaryEntityData(HttpServletResponse response); @RequestMapping(value = {"/sp_dictionary/save_riskType"}, method = {RequestMethod.POST}) ModelAndView saveRiskTypeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/sp_dictionary/remove_riskType"}, method = {RequestMethod.POST}) void removeRiskTypeDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping( value = {"/get_SafePolicyWarningDataByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getSafePolicyWarningEntityDataByName(HttpServletResponse response); @RequestMapping( value = {"/get_SafePolicyWarningData"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getSafePolicyWarningeEntityData(HttpServletResponse response); @RequestMapping(value = {"/sp_dictionary/save_safePolicyWarning"}, method = {RequestMethod.POST}) ModelAndView saveSafePolicyWarningDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/sp_dictionary/remove_SafePolicyWarning"}, method = {RequestMethod.POST}) void removeSafePolicyWarningDictionary(HttpServletRequest request, HttpServletResponse response);  }