Test case for check inventory - Jomsaruj/coffeemaker GitHub Wiki

Test ID Test Case Name Description Expected Result Actual Result Status
29 testCheckInventoryFormat invoke method checkInventory() and compare with expected format "Coffee: " + "coffeeAMT" + "\n" + "Milk: " + "milkAMT" + "\n" + "Sugar: " + "sugarAMT" + "\n" + "Chocolate: " + "chocolateAMT" + "\n" Same as expected result pass
30 testCheckInventoryAfterAdd add all inventory by 5 and check result All inventory should become 20 Inventory Exception throw fail
31 testCheckInventoryAfterPurchased Purchase recipe that require 3 coffee, 1 milk, 1 sugar Since 15 is default inventory, after purchase the recipe amount of coffee,sugar,milk and chocolate will become 12,14,14,15 respectively coffee = 18, sugar = 14, milk = 14, chocolate = 15 fail
33 testCheckInventoryAfterNotEnoughMoney Check whether inventory decrease or not if our purchase fail due to the reason that money paid is not enough Inventory should remain stable Same as expected result pass
35 testCheckInventoryAfterNotEnoughInventory Check whether inventory decrease or not if our purchase fail due to the reason that inventory is not enough to make the beverage Inventory should remain stable Same as expected result pass