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