예제 #1
0
        public void InitializeNewEntryForceCreate()
        {
            bool isInitialized = mainDBHelper.InitializeNewBillEntry("Suresh", true);

            Assert.IsTrue(isInitialized, "Internal Status of current Bill Entry not initialized");
            Assert.AreEqual(string.Empty, mainDBHelper.GetCustomerName(), "Internal customerName of current Bill Entry not initialized");
            Assert.AreEqual(string.Empty, mainDBHelper.GetPhoneNumber(), "Internal PhoneNumber of current Bill Entry not initialized");
            Assert.AreEqual("50000", mainDBHelper.GetBillID(), "Initialize value not read from file correctly.");
            Assert.AreEqual(BillType.Undefined, mainDBHelper.GetBillType(), "Internal Bill Type not in the right state.");
        }
예제 #2
0
        public void UpdateCustomerName(string customerName)
        {
            bool isUpdateSuccess = dbHelper.UpdateCustomerName(customerName);

            if (!isUpdateSuccess)
            {
                string currentName = dbHelper.GetCustomerName();
                view.UpdateCustomerName(currentName);
            }
        }