Exemplo n.º 1
0
        public void BuyItemWithoutPriceTest()
        {
            var itemWithoutBuyPrice = new CollectionItemInstance(Guid.NewGuid(), new ItemDefinition(Guid.NewGuid())
            {
                maxStackSize = 5, sellPrice = new [] { new CurrencyDecorator(_gold, 10f) }
            });

            _vendorCollection.Add(ToProduct(itemWithoutBuyPrice), 3);

            var canBuy = _vendor.CanBuyFromVendor(_customer, itemWithoutBuyPrice, 1);

            Assert.AreEqual(Errors.VendorProductHasNoPrice, canBuy.error);
            Assert.IsFalse(canBuy.result);
        }