@Test public void testRemoveDescriptiveDictionary() { jsonString = "{\"data\":{\"attributes\":[{\"$$hashKey\":\"object:257\",\"id\":\"choice1\",\"number\":\"12\"," + "\"option\":\"test\"}],\"description\":\"test\",\"descriptiveScopeName\":\"Test\",\"id\":1," + "\"search\":\"Test\"},\"userid\":\"demo\"}"; try (BufferedReader br = new BufferedReader(new StringReader(jsonString))) { when(request.getReader()).thenReturn(br); controller.removeDescriptiveDictionary(request, response); assertTrue(response.getContentAsString() != null && response.getContentAsString().contains("descriptiveScopeDictionaryDatas")); } catch (Exception e) { logger.error("Exception" + e); } }
@RequestMapping(value = {"/descriptive_dictionary/remove_descriptiveScope"}, method = {RequestMethod.POST}) public void removeDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.removeData(request, response, descriptiveDatas, DescriptiveScope.class); }
DescriptiveDictionaryController { @RequestMapping(value = {"/descriptive_dictionary/remove_descriptiveScope"}, method = {RequestMethod.POST}) public void removeDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.removeData(request, response, descriptiveDatas, DescriptiveScope.class); } }
DescriptiveDictionaryController { @RequestMapping(value = {"/descriptive_dictionary/remove_descriptiveScope"}, method = {RequestMethod.POST}) public void removeDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.removeData(request, response, descriptiveDatas, DescriptiveScope.class); } @Autowired  DescriptiveDictionaryController(CommonClassDao commonClassDao);  DescriptiveDictionaryController(); }
DescriptiveDictionaryController { @RequestMapping(value = {"/descriptive_dictionary/remove_descriptiveScope"}, method = {RequestMethod.POST}) public void removeDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.removeData(request, response, descriptiveDatas, DescriptiveScope.class); } @Autowired  DescriptiveDictionaryController(CommonClassDao commonClassDao);  DescriptiveDictionaryController(); void setCommonClassDao(CommonClassDao commonClassDao); @RequestMapping( value = {"/get_DescriptiveScopeByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getDescriptiveDictionaryByNameEntityData(HttpServletResponse response); @RequestMapping( value = {"/get_DescriptiveScope"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getDescriptiveDictionaryEntityData(HttpServletResponse response); @RequestMapping(value = {"/descriptive_dictionary/save_descriptive"}, method = {RequestMethod.POST}) ModelAndView saveDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/descriptive_dictionary/remove_descriptiveScope"}, method = {RequestMethod.POST}) void removeDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response); }
DescriptiveDictionaryController { @RequestMapping(value = {"/descriptive_dictionary/remove_descriptiveScope"}, method = {RequestMethod.POST}) public void removeDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException { DictionaryUtils utils = getDictionaryUtilsInstance(); utils.removeData(request, response, descriptiveDatas, DescriptiveScope.class); } @Autowired  DescriptiveDictionaryController(CommonClassDao commonClassDao);  DescriptiveDictionaryController(); void setCommonClassDao(CommonClassDao commonClassDao); @RequestMapping( value = {"/get_DescriptiveScopeByName"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getDescriptiveDictionaryByNameEntityData(HttpServletResponse response); @RequestMapping( value = {"/get_DescriptiveScope"}, method = {RequestMethod.GET}, produces = MediaType.APPLICATION_JSON_VALUE) void getDescriptiveDictionaryEntityData(HttpServletResponse response); @RequestMapping(value = {"/descriptive_dictionary/save_descriptive"}, method = {RequestMethod.POST}) ModelAndView saveDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response); @RequestMapping(value = {"/descriptive_dictionary/remove_descriptiveScope"}, method = {RequestMethod.POST}) void removeDescriptiveDictionary(HttpServletRequest request, HttpServletResponse response);  }