Exemple #1
0
        public void UpdateAdvanceMoreThanAmount()
        {
            AddMultipleProducts();
            double balance   = 0;
            bool   isUpdated = mainDBHelper.UpdateAdvance(200, out balance);

            Assert.IsFalse(isUpdated, "Updation should not happen when the advance is greater than total");
            Assert.AreEqual("0", mainDBHelper.GetAdvance(), "Internal values messed up.");
            Assert.AreEqual("190", mainDBHelper.GetBalance(), "Internal values messed up.");
            Assert.AreEqual("0", mainDBHelper.GetDiscount(), "Internal values messed up.");
        }
Exemple #2
0
 private void UpdateValues()
 {
     view.UpdateTotalAmount(dbHelper.GetTotalAmount());
     view.UpdateBalance(dbHelper.GetBalance());
     view.UpdateAdvance(dbHelper.GetAdvance());
     view.UpdateDiscount(dbHelper.GetDiscount());
 }