public void CalculateChangeTest() { //ARRANGE VM vm = new VM(); Edibles userProd = new Edibles("Snickers", 15, "Packed with peanuts, Snickers really satisfies", "Open the packaging and start eating", "energy bar"); int insert = 2; int expected = 85; int expected2 = 70; //ACT vm.InsertMoney(insert); vm.CalculateChange(userProd); int actual = vm.GetCredit(); vm.CalculateChange(userProd); int actual2 = vm.GetCredit(); //ASSERT Assert.Equal(expected, actual); Assert.Equal(expected2, actual2); }
public void CalculateChangeTest() { //ARRANGE VM vm = new VM(); Edibles userProd = new Edibles("Shinji Ramen Noodles", 15, "Spicy flavored ramen noodles made in Japan.", "cook the noodles in boiling water then eat them.", "noodles"); int insert = 2; int expected = 85; int expected2 = 70; //ACT vm.InsertMoney(insert); vm.CalculateChange(userProd); int actual = vm.GetCredit(); vm.CalculateChange(userProd); int actual2 = vm.GetCredit(); //ASSERT Assert.Equal(expected, actual); Assert.Equal(expected2, actual2); }
// Use this for initialization void Start() { DontDestroyOnLoad(gameObject); edibles = FindObjectOfType <Edibles> (); }