public void UpdateFlow_Test() { IList <UnderManagment> unders = new List <UnderManagment>(); UnderManagment under1 = new UnderManagment(); under1.Department = new Department() { ID = ADODepartment1.ID }; under1.Contains = true; UnderManagment under2 = new UnderManagment(); under2.Department = new Department() { ID = ADODepartment2.ID }; under2.Contains = true; under2.Person = new Person() { ID = ADOPerson4.ID }; unders.Add(under1); unders.Add(under2); busManager.UpdateFlow(ADOFlow1.ID, ADOAccessGroup2.ID, "FlowTest", unders); ClearSession(); BFlow bflow = new BFlow(); Flow testObject = bflow.GetByID(ADOFlow1.ID); Assert.AreEqual(ADOAccessGroup2.ID, testObject.AccessGroup.ID); Assert.IsNotNull(testObject.UnderManagmentList); Assert.AreEqual(2, testObject.UnderManagmentList.Count); Assert.IsTrue(testObject.UnderManagmentList.Where(x => x.Person != null && x.Person.ID == ADOPerson4.ID).Count() == 1); }
public void GetByID_Test() { flow_testObject = busflow.GetByID(ADOFlow1.ID); Assert.IsNotNull(flow_testObject); Assert.IsTrue(flow_testObject.ID == ADOFlow1.ID); }