Beispiel #1
0
        public void ApplyConditionSubstractShouldCall()
        {
            bool called = false;

            controllerMock.Setup(s => s.RemoveItemFromPlayer(It.IsAny <string>()))
            .Callback(() => called = true);
            var c = new InventoryCondition("subtract", string.Empty);

            c.ApplyCondition(controllerMock.Object);
            Assert.True(called);
        }
Beispiel #2
0
        public void ApplyConditionAddShouldCall()
        {
            bool called = false;

            controllerMock.Setup(s => s.AddItemToPlayer(It.IsAny <string>()))
            .Callback(() => called = true);
            var c = new InventoryCondition("add", string.Empty);

            c.ApplyCondition(controllerMock.Object);
            Assert.True(called);
        }