public void Attach() { Employee emp = new Employee(); FakeObjectSet<Employee> set = new FakeObjectSet<Employee>(); set.Attach(emp); Assert.IsTrue(set.Contains(emp), "Attach did not add supplied Employees to public Enumerator."); }
public void Attach() { Employee emp = new Employee(); FakeObjectSet <Employee> set = new FakeObjectSet <Employee>(); set.Attach(emp); Assert.IsTrue(set.Contains(emp), "Attach did not add supplied Employees to public Enumerator."); }
public void NullArgumentChecks() { Utilities.CheckNullArgumentException(() => { new FakeObjectSet <Employee>(null); }, "testData", "ctor"); FakeObjectSet <Employee> set = new FakeObjectSet <Employee>(); Utilities.CheckNullArgumentException(() => { set.AddObject(null); }, "entity", "AddObject"); Utilities.CheckNullArgumentException(() => { set.DeleteObject(null); }, "entity", "DeleteObject"); Utilities.CheckNullArgumentException(() => { set.Attach(null); }, "entity", "Attach"); Utilities.CheckNullArgumentException(() => { set.Detach(null); }, "entity", "Detach"); }
public void NullArgumentChecks() { Utilities.CheckNullArgumentException(() => { new FakeObjectSet<Employee>(null); }, "testData", "ctor"); FakeObjectSet<Employee> set = new FakeObjectSet<Employee>(); Utilities.CheckNullArgumentException(() => { set.AddObject(null); }, "entity", "AddObject"); Utilities.CheckNullArgumentException(() => { set.DeleteObject(null); }, "entity", "DeleteObject"); Utilities.CheckNullArgumentException(() => { set.Attach(null); }, "entity", "Attach"); Utilities.CheckNullArgumentException(() => { set.Detach(null); }, "entity", "Detach"); }