Example #1
0
        public void InsertCoin()
        {
            VendorMachine objVendor      = new VendorMachine();
            int           countofNickels = 0;
            int           countofQuater  = 0;
            int           countofDims    = 0;
            decimal       totalAmount    = 0;

            Assert.AreEqual("Total Amount is 0.10", objVendor.InsertCoin(0.7M, 2, ref countofDims, ref countofNickels, ref countofQuater, ref totalAmount));
        }
Example #2
0
        public void CalculateTotalPriceTest()
        {
            VendorMachine objVendor = new VendorMachine();

            Assert.AreEqual(0.4M, objVendor.CalculateTotalPrice(1, 1, 1));
        }
Example #3
0
        public void PinnesFindofCoinTest()
        {
            VendorMachine objVendor = new VendorMachine();

            Assert.AreEqual("Pinnes", objVendor.FindTypeofCoin(0.1M, 8));
        }
Example #4
0
        public void QuaterFindofCoinTest()
        {
            VendorMachine objVendor = new VendorMachine();

            Assert.AreEqual("Quater", objVendor.FindTypeofCoin(2.1M, 5));
        }
Example #5
0
        public void DimesFindofCoinTest()
        {
            VendorMachine objVendor = new VendorMachine();

            Assert.AreEqual("Dimes", objVendor.FindTypeofCoin(0.4M, 1));
        }
Example #6
0
        public void NickelsFindofCoinTest()
        {
            VendorMachine objVendor = new VendorMachine();

            Assert.AreEqual("Nickels", objVendor.FindTypeofCoin(0.7M, 2));
        }