public void DeleteAllDetails(int?scheduleID) { foreach (DRScheduleDetail detail in PXSelect <DRScheduleDetail, Where <DRScheduleDetail.scheduleID, Equal <Required <DRSchedule.scheduleID> > > > .Select(this, scheduleID)) { ScheduleDetail.Delete(detail); } }
public void DeleteScheduleDetail_Instance_ErrorResponse_Failure() { _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), It.IsAny <MethodType>(), It.IsAny <ConnectionServerRest>(), It.IsAny <string>(), true)).Returns(new WebCallResult { Success = false, ResponseText = "error text", StatusCode = 404 }); ScheduleDetail oDetail = new ScheduleDetail(_mockServer); var res = oDetail.Delete(); Assert.IsFalse(res.Success, "Calling DeleteScheduleDetail with ErrorResponse did not fail"); }