コード例 #1
0
 public void 投入金額が足りている場合には購入可能だが在庫不足の場合には購入不可()
 {
     Controller ctl = new Controller(new CoinMech(), new CommodityRack());
     for (int i = 0; i < 5; i++)
     {
         ctl._rack.Supply(Juice.Cola);
     }
     //ctl._coinMech.insertMoney(100);
     //ctl._coinMech.insertMoney(10);
     //ctl._coinMech.insertMoney(10);
     ctl._coinMech.InsertMoneyHelper(100, 10, 10);
     Assert.AreEqual(false,ctl.IsPurchasable(Juice.Cola));
 }
コード例 #2
0
 public void 投入金額が不足している場合は購入不可()
 {
     Controller ctl = new Controller(new CoinMech(), new CommodityRack());
     ctl._coinMech.InsertMoney(100); //コーラは120円なので買えない
     Assert.IsFalse(ctl.IsPurchasable(Juice.Cola));
 }