@Test /** itemCategoryDTO为空 */ public void test003() { Request request = new BaseRequest(); request.setCommand(ActionEnum.UPDATE_ITEM_CATEGORY.getActionName()); Response response = itemService.execute(request); System.out.println("**************************************"); System.out.println("Model:" + response.getModule()); System.out.println("message:" + response.getMessage()); System.out.println("ErrorCode:" + response.getErrorCode()); System.out.println("TotalCount:" + response.getTotalCount()); System.out.println("**************************************"); }
@Test /** sellerId为空 */ public void test003() { Request request = new BaseRequest(); request.setParam("ID", 12L); request.setCommand(ActionEnum.GET_ITEM_PROPERTY.getActionName()); Response response = itemService.execute(request); System.out.println("**************************************"); System.out.println("Model:" + response.getModule()); System.out.println("message:" + response.getMessage()); System.out.println("ErrorCode:" + response.getErrorCode()); System.out.println("TotalCount:" + response.getTotalCount()); System.out.println("**************************************"); }
@Test /** 主键在数据库不存在 */ public void test004() { Request request = new BaseRequest(); ItemCategoryDTO itemCategoryDTO = new ItemCategoryDTO(); itemCategoryDTO.setId(9999); itemCategoryDTO.setCateName("玩具23333"); request.setParam("itemCategoryDTO", itemCategoryDTO); request.setCommand(ActionEnum.UPDATE_ITEM_CATEGORY.getActionName()); Response response = itemService.execute(request); System.out.println("**************************************"); System.out.println("Model:" + response.getModule()); System.out.println("message:" + response.getMessage()); System.out.println("ErrorCode:" + response.getErrorCode()); System.out.println("TotalCount:" + response.getTotalCount()); System.out.println("**************************************"); }