Пример #1
0
        public void Test222222222222()
        {
            ClearSession();
            base.UpdateCurrentUserPersonId(32688);

            BKartabl b = new BKartabl();

            busRegisteredRequest = new BKartabl();
            UserRequestFilterProxy proxy = new UserRequestFilterProxy();

            proxy.RequestType = RequestType.Daily;
            IList <KartablProxy> list = busRegisteredRequest.GetAllUserRequests(RequestState.UnKnown, 1390, 12, 0, 14);

            list = busRegisteredRequest.GetFilterUserRequests(proxy, 0, 10);
            busRegisteredRequest.GetAllUserRequests(RequestState.UnKnown, 1390, 10, 0, 12);
            busRegisteredRequest.GetAllUserRequests(RequestState.UnKnown, 1390, 10, 1, 12);
        }
Пример #2
0
        public void Operator_GetAllRequest()
        {
            busRegisteredRequest = new BKartabl(ADOPerson6.ID, ADOUser6.ID, ADOUser6.UserName);

            IList <KartablProxy> list = busRegisteredRequest.GetAllUserRequests(RequestState.UnKnown, 1389, 2, 0, 10);

            Assert.AreEqual(2, list.Count);
            Assert.IsTrue(list.Where(x => x.RequestID == ADORequestDailyLeave1.ID).Count() == 1);
            Assert.IsTrue(list.Where(x => x.RequestID == ADORequestDailyDuty1.ID).Count() == 1);
        }
Пример #3
0
        public void Operator_Test2222222()
        {
            UpdateCurrentUserPersonId(32682);
            busRegisteredRequest = new BKartabl();
            busRegisteredRequest.GetAllUserRequests(RequestState.Deleted, 1390, 12, 0, 20);
            //request_testObject.TheFromDate = "1390/12/01";
            //request_testObject.TheToDate = "1390/12/29";
            //request_testObject.Precard = new Precard() { ID = 61 };

            //busRegisteredRequest.InsertCollectiveRequest(request_testObject, new List<decimal>(), 1390, 11);
        }
Пример #4
0
        public void GetRequest_Test()
        {
            try
            {
                IList <KartablProxy> list = busRegisteredRequest.GetAllUserRequests(RequestState.UnKnown, 1389, 2, 0, 10);
                Assert.AreEqual(3, list.Count);

                Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyLeave1.ID).Count() == 1);
                Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyLeave1.ID).First().FlowStatus == RequestState.Unconfirmed);

                Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyLeave2.ID).Count() == 1);
                Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyLeave2.ID).First().FlowStatus == RequestState.Confirmed);

                Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyDuty1.ID).Count() == 1);
                Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyDuty1.ID).First().FlowStatus == RequestState.Unconfirmed);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }