public void ModifyDic_Test() { DicInputModel testModel = new DicInputModel() { DicValue = "测试DicValue", DicText = "测试DicText", }; BaseResultModel <DicOutputModel> result = DicService.ModifyDic(testModel); Assert.IsTrue(result.IsSuccess, result.ErrorMessage); testModel = new DicInputModel() { DicID = result.Data.DicID, }; result = DicService.ModifyDic(testModel); Assert.IsTrue(result.IsSuccess, result.ErrorMessage); BaseResultModel <int> delResult = DicService.DeleteDic(new List <Guid?>() { testModel.DicID }); Assert.IsTrue(delResult.IsSuccess, delResult.ErrorMessage); }
public BaseResultModel <int> DeleteDic(List <Guid?> IDs) { if (IDs == null || IDs.Count == 0) { return(new ErrorResultModel <int>(EnumErrorCode.请求参数错误, "参数不能为空")); } return(DicService.DeleteDic(IDs)); }