public void DeleteObject() { Employee emp = new Employee(); FakeObjectSet<Employee> set = new FakeObjectSet<Employee>(new Employee[] { emp }); set.DeleteObject(emp); Assert.IsFalse(set.Contains(emp), "DeleteObject did not remove supplied Employees to public Enumerator."); }
public void DeleteObject() { Employee emp = new Employee(); FakeObjectSet <Employee> set = new FakeObjectSet <Employee>(new Employee[] { emp }); set.DeleteObject(emp); Assert.IsFalse(set.Contains(emp), "DeleteObject did not remove 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"); }