public void ChangeTrackingModelBase_AddHandlerNullTest()
        {
            var person = new ChangeTrackingPerson();

            try
            {
                person.AddHandler(null);
                Assert.Fail("Excepted an ArgumentNullException");
            }
            catch (ArgumentNullException ex)
            {
                Assert.AreEqual("eventHandler", ex.ParamName);
            }
        }
        public void ChangeTrackingModelBase_AddRemoveHandlerTest()
        {
            var fired    = false;
            var person   = new ChangeTrackingPerson();
            var listener = new Listener <PropertyChangedEventArgs>((sender, e) => { fired = true; });

            person.ErrorsChanged += (sender, e) => { };
            person.AddHandler(listener);
            person.FirstName = "Tom";
            Assert.IsTrue(fired);
            fired = false;
            person.RemoveHandler(listener);
            person.FirstName = "Sam";
            Assert.IsFalse(fired);
        }