public void Test_SuccessfulPurchase()
        {
            ApolloNorth.VendingMachine vm = new ApolloNorth.VendingMachine(1, 50);
            var result = vm.BuyDrink();

            Assert.IsTrue(result.Contains("CAN Dispensed"));
        }
        public void Test_Inventory_Balance_Total()
        {
            ApolloNorth.VendingMachine vm = new ApolloNorth.VendingMachine(25, 250);
            var result = vm.ToString();

            Assert.AreEqual(result, "Total Inventory: 25      Account Amount: 250p");
        }
        public void Test_InsufficientAmountForPurchase()
        {
            ApolloNorth.VendingMachine vm = new ApolloNorth.VendingMachine(1, 0);
            var result = vm.BuyDrink();

            Assert.IsTrue(result == "Insufficient fund in Account");
        }
        public void Test_Pin_Invalid()
        {
            ApolloNorth.VendingMachine vm = new ApolloNorth.VendingMachine();
            vm.SuppliedPin = "145";
            var result = vm.ValidatePin();

            Assert.IsFalse(result == "Invalid Card Pin");
        }
        public void Test_Pin_Valid()
        {
            ApolloNorth.VendingMachine vm = new ApolloNorth.VendingMachine();
            vm.SuppliedPin = "01234";
            var result = vm.ValidatePin();

            Assert.IsTrue(result == "OK");
        }
        public void Test_ZeroQuantityInventory_ZeroAmount()
        {
            ApolloNorth.VendingMachine vm = new ApolloNorth.VendingMachine(0, 0);
            var result = vm.BuyDrink();

            Assert.IsTrue(result == "Inventory Out of Stock");

            Assert.AreEqual(result, "Inventory Out of Stock");
        }
 public void Test_WorkingConstructor()
 {
     ApolloNorth.VendingMachine vm = new ApolloNorth.VendingMachine(25, 250);
     Assert.AreEqual(vm.NumberOfCan, 25);
     Assert.AreEqual(vm.AccountBalance, 250);
 }