Example #1
0
 public IBankProduct Visit(BankAccountDebet bankAccount)
 {
     if (bankAccount.GetSaldo() > 1000)
     {
         return(bankAccount);
     }
     return(null);
 }
Example #2
0
        public void GetSaldoTest()
        {
            Client       client      = new Client("Jan", "Nowak", "01234567891");
            IBankProduct bankAccount = new BankAccount("123", new InterestTenPercent(), 1000, client);

            bankAccount = new BankAccountDebet((BankAccount)bankAccount, 100);
            Assert.AreEqual(1100, bankAccount.GetSaldo());
        }