public void UndoEdit_before_begin_edit()
        {
            MockEntity entity = new MockEntity()
            {
                IntProperty = 1
            };

            Should.Throw <ArgumentNullException>(() => entity.UndoEdit());
        }
        public void UndoEdit()
        {
            bool       isEventRaised = false;
            int        before        = 1;
            int        after         = 2;
            MockEntity entity        = new MockEntity()
            {
                IntProperty = before
            };

            entity.Undo += (s, e) => { isEventRaised = true; };
            entity.BeginEdit();

            entity.IntProperty = after;
            entity.UndoEdit();

            Assert.IsTrue(isEventRaised);
            Assert.AreEqual(before, entity.IntProperty);
            Assert.IsTrue(entity.IsEditing);
        }