Ejemplo n.º 1
0
        public void GetEnchantment_Get()
        {
            enchantment.Get(performer.Object, item.Object, null);

            effect.Verify(e => e.ProcessEffect(effectParameter.Object), Times.Once);
            effectParameter.VerifySet(e => e.ObjectRoom = room.Object);
        }
Ejemplo n.º 2
0
        public void GetEnchantment_Get()
        {
            Mock <IRandom>       random = new Mock <IRandom>();
            Mock <IMobileObject> mob    = new Mock <IMobileObject>();
            Mock <IItem>         item   = new Mock <IItem>();
            Mock <IRoom>         room   = new Mock <IRoom>();

            random.Setup(e => e.PercentDiceRoll(100)).Returns(true);
            mob.Setup(e => e.Room).Returns(room.Object);

            GlobalReference.GlobalValues.Random = random.Object;

            enchantment.Get(mob.Object, item.Object);

            effect.Verify(e => e.ProcessEffect(parameter.Object), Times.Once);
            parameter.VerifySet(e => e.ObjectRoom = room.Object);
        }