public void TakeMoreThanAvailableShouldThrow() { var storage = new CommodityStorage(); storage.Deposit(grain, 2); storage.Withdraw(grain, 3); }
public void SimpleCommodityStorageTest() { var storage = new CommodityStorage(); Assert.AreEqual(0, storage[grain]); storage.Deposit(grain, 2); Assert.AreEqual(2, storage[grain]); storage.Withdraw(grain, 1); Assert.AreEqual(1, storage[grain]); }