Exemplo n.º 1
0
        public void TestRemoveReferenceFromCollection()
        {
            object ts = update.GetResource(nhib.Timesheets.Where(t => !t.Submitted), typeof(Timesheet).FullName);

            Assert.IsInstanceOfType(typeof(Timesheet), ts);
            Timesheet actualTimesheet = (Timesheet)ts;

            TimesheetEntry entry = actualTimesheet.Entries[0];

            update.RemoveReferenceFromCollection(ts, "Entries", entry);

            Assert.IsFalse(actualTimesheet.Entries.Contains(entry));
        }