Exemplo n.º 1
0
        public void Pay_TestPay_ReturnsStringSuccessful()
        {
            string msg      = User.ShowTotal() + ".  Thank you for paying for your bill.";
            string expected = msg;
            string actual;

            actual = User.Pay();
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        private void btnPay_Click(object sender, EventArgs e)
        {
            MessageBox.Show(user.Pay());
            // open file for output
            outFile = new FileStream(FILENAME, FileMode.Append, FileAccess.Write);

            // output object to file via serialization
            bFormatter.Serialize(outFile, user);

            // close file
            outFile.Close();

            //clear label with old total
            lblRunTotal.Text = user.ShowTotal();
        }