public void CommitTest() { //Arrange int setPropertyCalledValue = 0; Quest quest = QuestHelper.CreateQuest(); MockPropertyChangeQuestCommand command = new MockPropertyChangeQuestCommand(); command.OnSetPropertyValue += (q, v) => { setPropertyCalledValue++; }; //Act command.Execute(quest); command.Commit(); bool undoResult = command.Undo(quest); //Assert Assert.IsFalse(undoResult); Assert.AreEqual(0, setPropertyCalledValue); }