Example #1
0
        public void OnChange_for_New_ValueTypes()
        {
            var notifier = new ExplicitValueTypeNotifier_Specialized();

            notifier.OnChangeInt = 43;
            notifier.OnChangeInt = 43;
            Assert.AreEqual(3, notifier.ChangeCount);
        }
Example #2
0
        public void OnChange_for_New_ReferenceTypes()
        {
            var notifier       = new ExplicitValueTypeNotifier_Specialized();
            var expectedObject = new object();

            notifier.OnChangeVirtualObject = expectedObject;
            Assert.AreEqual(expectedObject, notifier.OnChangeVirtualObject);
            notifier.OnChangeVirtualObject = expectedObject;
            Assert.AreEqual(1, notifier.ChangeCount);
        }