Exemplo n.º 1
0
 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.");
 }
Exemplo n.º 2
0
        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.");
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
0
        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");
        }