public void 投入金額がそのまま払い戻し金額になるかテスト(int insertNum,int exp) { //投入するお金を用意 this.SetMoneyNum(insertNum); var target = new MoneyController(); //お金を投入 target.InputMoneyAdd(this.yen10); target.InputMoneyAdd(this.yen50); target.InputMoneyAdd(this.yen100); target.InputMoneyAdd(this.yen500); var expect = exp; target.MoveInput2Refund(); var actual = target.RefundMoneySum(); Assert.AreEqual(expect, actual); }
public void 取り扱い外の投入金がそのまま払い戻し金額になるかテスト(int insertNum) { //投入するお金を用意 this.SetMoneyNum(insertNum); var target = new MoneyController(); var expect = 0; //取り扱い外のお金を投入 target.InputMoneyAdd(this.yen1); expect += this.yen1.Sum(); target.InputMoneyAdd(this.yen5); expect += this.yen5.Sum(); target.InputMoneyAdd(this.yen2000); expect += this.yen2000.Sum(); target.InputMoneyAdd(this.yen5000); expect += this.yen5000.Sum(); target.InputMoneyAdd(this.yen10000); expect += this.yen10000.Sum(); //取り扱いOKのお金を投入 target.InputMoneyAdd(this.yen10); target.InputMoneyAdd(this.yen50); target.InputMoneyAdd(this.yen100); target.InputMoneyAdd(this.yen500); target.InputMoneyAdd(this.yen1000); var actual = target.RefundMoneySum(); Assert.AreEqual(expect, actual); }