예제 #1
0
        public void GetDepartmentTreeTest()
        {
            Department dep = bussWorkTime.GetManagerDepartmentTree();

            Assert.IsTrue(dep.Visible);
            Assert.IsTrue(dep.ChildList.Where(x => x.ID == ADODepartment1.ID).First().Visible);
            if (dep.ChildList.Count > 1)
            {
                Assert.IsFalse(dep.ChildList.Where(x => x.ID != ADODepartment1.ID).First().Visible);
            }
        }
예제 #2
0
        public void GetDepartmentTree_PersonNotManagerTest()
        {
            try
            {
                bussWorkTime = new BWorkedTime(ADOUser4.UserName);
                Department dep = bussWorkTime.GetManagerDepartmentTree();

                Assert.Fail("فقط مدیران میتوانند به این سرویس دسترسی داشته باشند");
            }
            catch (IllegalServiceAccess ex)
            {
                Assert.Pass(ex.Message);
            }
        }
예제 #3
0
        public void GetDepartmentTree_DepartmentNullTest()
        {
            try
            {
                bussWorkTime = new BWorkedTime(ADOUser3.UserName);
                Department dep = bussWorkTime.GetManagerDepartmentTree();

                Assert.Fail("بخش برای افراد تحت مدیریت نباید تهی باشد");
            }
            catch (InvalidDatabaseStateException ex)
            {
                Assert.AreEqual(ex.FatalExceptionIdentifier, UIFatalExceptionIdentifiers.UnderManagmentDepartmentNull);
            }
        }
예제 #4
0
        public void GetUnderManagmentBySearch_BarcodeTest22222()
        {
            try
            {
                base.UpdateCurrentUserPersonId(32678);
                bussWorkTime = new BWorkedTime();


                Department dep = bussWorkTime.GetManagerDepartmentTree();
                IList <UnderManagementPerson> list1 = bussWorkTime.GetUnderManagmentByDepartment(9, dep.ID, 0, 20, GridOrderFields.gridFields_BarCode, GridOrderFieldType.asc);
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
        }
예제 #5
0
        protected void Button48_Click(object sender, EventArgs e)
        {
            BWorkedTime bus = new BWorkedTime();

            bus.GetManagerDepartmentTree();
        }