예제 #1
0
        public void IsDebitOrIsCredit()
        {
            var t = new Transaction(debit: _cashOnHand, credit: _bank, amount: 10M);

            Assert.That(t.IsDebitAccount(_cashOnHand), Is.True);
            Assert.That(t.IsDebitAccount(_bank), Is.False);
            Assert.That(t.IsDebitAccount(_mortgage), Is.False);

            Assert.That(t.IsCreditAccount(_cashOnHand), Is.False);
            Assert.That(t.IsCreditAccount(_bank), Is.True);
            Assert.That(t.IsCreditAccount(_mortgage), Is.False);
        }