public void CanBuyFromVendorTest() { _vendorCollection.Add(_product1, 10); _customerCurrencies.Set(_gold, 100f); var result = _vendor.CanBuyFromVendor(_customer, _item1); Assert.IsNull(result.error); Assert.IsTrue(result.result); }
public void CanSellToVendorCollectionFullTest() { _vendorCurrencies.Set(_gold, 100f); _customer.AddItem(_item1, 10); _vendorCollection.Add(_product2, 50); var result = _vendor.CanSellToVendor(_customer, _product1); Assert.AreEqual(Errors.CollectionFull, result.error); Assert.IsFalse(result.result); }
public void AddToCurrencyMaxAmountTest() { var result1 = _currencies.Set(_gold, 999f); var result = _currencies.Add(_gold, 10f); Assert.IsNull(result1.error); Assert.AreEqual(Errors.CollectionFull, result.error); Assert.IsFalse(result.result); }