public void DeleteRequest_PermitCheck() { UpdateCurrentUserPersonId(ADOPerson1.ID); busKartabl = new BKartabl(); KartableSetStatusProxy proxy = new KartableSetStatusProxy(ADORequestDailyLeave1.ID, ADOManagerFlow3.ID); IList <KartableSetStatusProxy> list = new List <KartableSetStatusProxy>(); list.Add(proxy); bool result = busKartabl.SetStatusOfRequest(list, RequestState.Confirmed, ""); DatasetGatewayWorkFlow.TA_PermitPairDataTable table = permitPairTA.GetDataByRequestId(ADORequestDailyLeave1.ID); Assert.AreEqual(1, table.Rows.Count); ClearSession(); busReviewd.DeleteRequst(ADORequestDailyLeave1.ID, ""); table = permitPairTA.GetDataByRequestId(ADORequestDailyLeave1.ID); Assert.AreEqual(0, table.Rows.Count); }
public void DeleteRequest_test() { try { UpdateCurrentUserPersonId(ADOPerson1.ID); busReviewd = new BKartabl(); IList <KartablProxy> list = busReviewd.GetAllRequests(RequestState.UnKnown, 1389, 2, 0, 10, KartablOrderBy.RegisteredBy); Assert.AreEqual(6, list.Count); decimal id = list[0].ID; busReviewd.DeleteRequst(id, ""); ClearSession(); request_testObject = new BRequest().GetByID(id); Assert.AreEqual(1, request_testObject.RequestStatusList.Where(x => x.IsDeleted).Count()); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void DeleteRequest_LevelTest() { try { UpdateCurrentUserPersonId(ADOPerson1.ID); busReviewd = new BKartabl(); IList <KartablProxy> list = busReviewd.GetAllRequests(RequestState.UnKnown, 1389, 2, 0, 10, KartablOrderBy.RegisteredBy); Assert.AreEqual(6, list.Count); decimal id = list[0].ID; busReviewd.DeleteRequst(id, ""); ClearSession(); IList <KartablFlowLevelProxy> l = busKartabl.GetRequestLevelsByManagerFlowID(id, list[0].ManagerFlowID); int count = l.Where(x => x.RequestStatus != RequestState.Deleted).Count(); Assert.Greater(l.Count, 0); Assert.AreEqual(1, count); } catch (Exception ex) { Assert.Fail(ex.Message); } }