public void ShouldBeDirtyIfAnyDirtiablesAreDirty() { var dirtyResource = A.Fake<Faction>(); A.CallTo(() => dirtyResource.IsClean()).Returns(false); var mob = new Mob(); mob.Faction = dirtyResource; mob.Reset(); Assert.IsFalse(mob.IsClean()); }
public void ShouldMarkModifiedFieldsAsChanged() { var mob = new Mob(); Assert.IsTrue(mob.IsClean()); Assert.IsFalse(mob.IsFieldDirty("Level")); mob.Level = 34; Assert.IsTrue(mob.IsFieldDirty("Level")); Assert.IsFalse(mob.IsClean()); mob.Reset(); Assert.IsFalse(mob.IsFieldDirty("Level")); }