Inheritance: Sharpify.Models.ShopifyResourceModel
Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
 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"));
 }