public void GetAllManager_UserAsOperator_Test() { base.UpdateCurrentUserPersonId(ADOPerson1.ID); dataAccessMngTA.Insert(BUser.CurrentUser.ID, ADOManager1.ID, false); dataAccessMngTA.Insert(BUser.CurrentUser.ID, ADOManager2.ID, false); IList <Person> list = busSubstitute.GetAllManager(0, 10); Assert.AreEqual(2, list.Count); Assert.AreEqual(ADOPerson2.ID, list.First().ID); }
public void GetAllManager_UserAsOperatorAndManager_Test() { base.UpdateCurrentUserPersonId(ADOPerson2.ID); dataAccessMngTA.Insert(BUser.CurrentUser.ID, ADOManager1.ID, false); busSubstitute = new BSubstitute(ADOPerson2.ID); IList <Person> list = busSubstitute.GetAllManager(0, 10); Assert.AreEqual(1, list.Count); Assert.IsTrue(list.Where(x => x.ID == ADOPerson2.ID).Count() == 1); }
public void GetAllManager_UserAsOperator_ExtraPage_Test() { try { base.UpdateCurrentUserPersonId(ADOPerson1.ID); dataAccessMngTA.Insert(BUser.CurrentUser.ID, ADOManager1.ID, false); dataAccessMngTA.Insert(BUser.CurrentUser.ID, ADOManager2.ID, false); busSubstitute = new BSubstitute(ADOPerson1.ID); IList <Person> list = busSubstitute.GetAllManager(2, 10); Assert.Fail(); } catch (OutOfExpectedRangeException ex) { Assert.Pass(); } }
public void Test222222() { busSubstitute = new BSubstitute(32688); IList <Person> list = busSubstitute.GetAllManager(0, 10); }