14using TestClass = NUnit.Framework.TestFixtureAttribute;
15using TestInitialize = NUnit.Framework.SetUpAttribute;
16using TestCleanup = NUnit.Framework.TearDownAttribute;
17using TestMethod = NUnit.Framework.TestAttribute;
19using Microsoft.VisualStudio.TestTools.UnitTesting;
32 expected.AllowEdit =
true;
37 Assert.AreEqual(expected.AllowEdit, actual.AllowEdit);
44 expected.AllowRemove =
true;
49 Assert.AreEqual(expected.AllowRemove, actual.AllowRemove);
56 expected.AllowNew =
true;
61 Assert.AreEqual(expected.AllowNew, actual.AllowNew);
68 expected.RaiseListChangedEvents =
false;
73 Assert.AreEqual(expected.RaiseListChangedEvents, actual.RaiseListChangedEvents);
80 original.RaiseListChangedEvents =
true;
85 Assert.IsTrue(original.HasRaisedOnListChanged,
"ListChanged event should have been raised.");
90 Assert.IsTrue(deserialized.Count > 0);
91 Assert.IsTrue(deserialized.RaiseListChangedEvents,
"Deserializing list should leave RaiseListChangedEvents unchanged.");
92 Assert.IsFalse(deserialized.HasRaisedOnListChanged,
"Deserializing list should not have raised ListChanged event.");
94 original.RaiseListChangedEvents =
false;
98 Assert.IsTrue(deserialized2.Count > 0);
99 Assert.IsFalse(deserialized2.RaiseListChangedEvents,
"Deserializing list should leave RaiseListChangedEvents unchanged 2.");
100 Assert.IsFalse(deserialized2.HasRaisedOnListChanged,
"Deserializing list should not have raised ListChanged event 2.");
void VerifyRaiseListChangedEvents()
void VerifyDeserializingListDoesNotRaiseListChangedEvent()