Catel.Test.Data.ModelBaseFacts.SuspendChangeNotificationFacts.CorrectlyRaisesChangeNotifications C# (CSharp) Метод

CorrectlyRaisesChangeNotifications() приватный Метод

private CorrectlyRaisesChangeNotifications ( ) : void
Результат void
            public void CorrectlyRaisesChangeNotifications()
            {
                var model = new SuspendableTestModel();

                // First change without change notifications so IsDirty = true
                model.FirstName = "1";

                var changedProperties = new List<string>();

                model.PropertyChanged += (sender, e) =>
                {
                    changedProperties.Add(e.PropertyName);
                };

                model.FirstName = "A";
                model.LastName = "B";

                Assert.AreEqual(2, changedProperties.Count);

                Assert.AreEqual("FirstName", changedProperties[0]);
                Assert.AreEqual("LastName", changedProperties[1]);
            }