Example #1
0
        private void bCreate_Click(object sender, EventArgs e)
        {
            Main f = new Main();
            f.CreateCustomer(tbName.Text, tbEmail.Text);
            //List<Account> accounts = new List<Account>();

            //Customer c = new Customer(tbName.Text,tbEmail.Text,accounts);

            //f.Customers.Add(c);
            this.Hide();
        }
Example #2
0
        public void TestAddNegative()
        {
            // arrange
            int amount = -100;
            int expected = 0;

            MandatoryTest.Main f = new MandatoryTest.Main();

            f.CreateCustomer("Leroy Jenkins", "*****@*****.**");
            f.addAcc(0);

            //act
            f.add(0, 0, amount);

            // assert
            int actual = f.getBalance(0, 0);
            Assert.AreEqual(expected, actual, "AddNeg Test Failed");
        }