private void submit_Click(object sender, EventArgs e) { int accountType = 0; if (this.accountTypeComboBox.SelectedItem.ToString() == "Chequing Account") { accountType = 1; } else if (this.accountTypeComboBox.SelectedItem.ToString() == "Saving Account") { accountType = 2; } else if (this.accountTypeComboBox.SelectedItem.ToString() == "Liability Account") { accountType = 3; } if (accountDL.AddAccount(Int64.Parse(this.customerIdSearch.Text), this.dateOpenedPicker.Value, this.branchIDcomboBox.SelectedIndex + 1, accountType)) { MessageBox.Show("Account Opened Successfully!!!"); } else { MessageBox.Show("Database Connection Issue"); } this.Close(); }
public void AccountHandle_ClosingUnknownCustomerAccount_ReturnsFalse() { //Arrange bool expected = false; AccountDL accountDL = new AccountDL(); //Act bool actual = accountDL.AddAccount(999999999999999999, DateTime.Now, 1, 3); //Assert Assert.AreEqual(expected, actual); }
public void AddAccount_OpeningLiabilityForExistingCustomerAccount_ReturnsTrue() { //Arrange bool expected = true; AccountDL accountDL = new AccountDL(); //Act bool actual = accountDL.AddAccount(10000000113, DateTime.Now, 1, 3); //Assert Assert.AreEqual(expected, actual); }