public void TestMethodAddAccount() { Account a = new Account(); c.AddAccount(a); List<Account> list = (List<Account>) pc.GetField("list"); Assert.AreEqual(a, list[1]); }
public void Init() { c = new Customer(); pc = new PrivateObject(c); ac = new Account(); c.AddAccount(ac); }
public void AddAccount(Account acc) { if (!list.Contains(acc)) { list.Add(acc); } else { throw new ArgumentException("Account allerede i listen"); } }