Example #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.");
        }
Example #2
0
        public void UpdatePhoneNumber(string phoneNumber)
        {
            bool isUpdateSuccess = dbHelper.UpdatePhoneNumber(phoneNumber);

            if (!isUpdateSuccess)
            {
                string currentPhoneNumber = dbHelper.GetPhoneNumber();
                view.UpdatePhoneNumber(currentPhoneNumber);
            }
        }