public void ModifyAcademicYear_Test() { AcademicYearInputModel testModel = new AcademicYearInputModel() { AcademicYearName = "测试AcademicYearName", Term = "测试Term", InputStatus = 82, }; BaseResultModel <AcademicYearOutputModel> result = AcademicYearService.ModifyAcademicYear(testModel); Assert.IsTrue(result.IsSuccess, result.ErrorMessage); testModel = new AcademicYearInputModel() { AcademicYearID = result.Data.AcademicYearID, AcademicYearName = "测试AcademicYearName", }; result = AcademicYearService.ModifyAcademicYear(testModel); Assert.IsTrue(result.IsSuccess, result.ErrorMessage); BaseResultModel <int> delResult = AcademicYearService.DeleteAcademicYear(new List <Guid?>() { testModel.AcademicYearID }); Assert.IsTrue(delResult.IsSuccess, delResult.ErrorMessage); }
public BaseResultModel <int> DeleteAcademicYear(List <Guid?> IDs) { if (IDs == null || IDs.Count == 0) { return(new ErrorResultModel <int>(EnumErrorCode.请求参数错误, "参数不能为空")); } return(AcademicYearService.DeleteAcademicYear(IDs)); }