AppGroupService { public ServiceResult deleteCheck(Long dbsetId) throws SQLException { if (deleteCheckDao.isDbsetIdInProject(dbsetId)) { return ServiceResult.fail("请先删除应用组关联的项目！"); } return ServiceResult.success(); }  ValidatorChain validatePermision(LoginUser user, Errors errors); ListResult<AppGroupView> findProjectGroupPageList(Paging<AppGroup> paging); ServiceResult<String> insertAppGroup(AppGroup appGroup); ServiceResult deleteCheck(Long dbsetId); ServiceResult<String> deleteAppGroup(AppGroup appGroup); ServiceResult<String> updateAppGroup(AppGroup appGroup); boolean isNotExistByName(AppGroup appGroup);  }
@Test public void deleteCheckTest() throws SQLException { ServiceResult sr = appGroupService.deleteCheck(1L); Assert.assertTrue(sr.getCode() == ServiceResult.SUCCESS); }