public void ATMCardSuccessfulTransactionTest() { var client = new NaturalPerson("Jan Kowalski", "11312737254"); var card = new ATMCard("1234567890", client, true, 1250.12m); card.MakeTransaction(1200m); Assert.AreEqual(card.Balance, 2450.12m); }
public void ATMCardTransactionRejectedTest() { var client = new NaturalPerson("Jan Kowalski", "11312737254"); var card = new ATMCard("1234567890", client, true, 1250.12m); try { card.MakeTransaction(-1500m); } catch (InsufficientCardBalanceException) { Assert.AreEqual(card.Balance, 1250.12m); } Assert.AreEqual(card.Balance, 1250.12m); }