public void AddAccountToList_ShouldNotWork(string pincode, double balance) { Account newAccount = new Account(pincode, balance); List <Account> accounts = new List <Account>(); Assert.Throws <ArgumentException>(() => ATM.AddAccountToList(newAccount, accounts)); }
public void AddAccountToList_ShouldWork() { Account newAccount = new Account("1111", 1234); List <Account> accounts = new List <Account>(); ATM.AddAccountToList(newAccount, accounts); Assert.True(accounts.Count == 1); Assert.Contains(newAccount, accounts); }