public void MoreCoinsAndCancel_01() { int[] returnCoins; int[] returnCoinsExpected = { 0, 1, 2, 0, 0, 0 }; int[] coins = { 1, 2, 3, 4, 5, 6 }; string[] productNames = { "Kaffee", "Tee", "Suppe", "Milch" }; Logic.CoffeeSlotMachine coffeeSlotMachine = new Logic.CoffeeSlotMachine(coins, productNames); bool ok = coffeeSlotMachine.InsertCoin(20); Assert.IsTrue(ok, "20 ist eine gültige Münze"); ok = coffeeSlotMachine.InsertCoin(20); Assert.IsTrue(ok, "20 ist eine gültige Münze"); ok = coffeeSlotMachine.InsertCoin(10); Assert.IsTrue(ok, "10 ist eine gültige Münze"); Assert.AreEqual(21, coffeeSlotMachine.CoinsInDepot, "Münzen wurden noch nicht übernommen"); coffeeSlotMachine.CancelOrder(); returnCoins = coffeeSlotMachine.EmptyEjection(out _); Assert.IsTrue(CompareArrays(returnCoins, returnCoinsExpected), "Stornierte Münzen stimmen nicht"); Assert.AreEqual(21, coffeeSlotMachine.CoinsInDepot, "Alter Zustand bleibt erhalten"); }