static void Main(string[] args) { BusinessAccount <int, int> account = new BusinessAccount <int, int>(8, 6, true); account.Credit(100, 9); account.Credit(100, 8); account.Credit(100, 6); account.Credit(100, 1); Console.WriteLine(account.Transactions); Console.WriteLine("Hello World!"); }
public void BusinessAccount_Credit_InvalidAmount() { decimal creditAmount = -50; decimal initalBalance = 100; decimal expected = 100; decimal overdraftLimit = 10000; BusinessCustomer bc = new BusinessCustomer() { CustomerID = Guid.NewGuid(), ContactInformation = new Contact() { FirstName = "test", LastName = "test", Address = "123 test street", Email = "*****@*****.**", PhoneNumbers = new List <string>() { "123-122" } }, RegisteredName = "Acme Inc", TradingName = "ACE" }; BusinessAccount ba = new BusinessAccount(bc, initalBalance, overdraftLimit); ba.Credit(creditAmount); decimal actual = ba.Balance; Assert.AreEqual(expected, actual); }