Esempio n. 1
0
        public void ATMWithdrawShoudWithdrawMoney()
        {
            ATMWithdrawal.WithdrawMoney(cardNumber, cardPin, 100M);
            var testContext = new ATMEntities();
            var newCash     = testContext.CardAccounts.First(c => c.CardNumber == cardNumber).CardCach;

            Assert.AreEqual(900M, newCash);
        }
Esempio n. 2
0
        public void ATMWithdrawShoudCheckIsValidPinNumber()
        {
            ATMWithdrawal.WithdrawMoney(cardNumber, cardPin, 0M);

            int count = context.CardAccounts.Count(c => c.CardNumber == cardNumber && c.CardPIN == cardPin);

            Assert.IsTrue(count == 1, "There is no card with this PIN!");
        }