Slide 24
Slide 24 text
2ͭͷςετγφϦΦ
ςετγφϦΦͷ࡞
Scenario: ೖֹۚ֬ೝ
Given ࣗಈൢചػ͕͋Δ
When 100ԁΛೖۚ
Then 100ԁ͕ೖۚ͞Ε͍ͯΔ
Scenario: ೖֹۚ֬ೝ
Given ࣗಈൢചػ͕͋Δ
When 100ԁΛೖۚ
And 50ԁΛೖۚ
Then 150ԁ͕ೖۚ͞Ε͍ͯΔ
public class VendingMachine
{
int currentMoney
;
public void insertCoin(int money)
{
currentMoney = money
;
}
public int getCurrentMoney()
{
return currentMoney
;
}
}