Esempio n. 1
0
        public void SimpleEntry()
        {
            var accounting = new Accounting();

            var entry = new Entry("debit-account", "credit-account", 100m);
            accounting.Register(entry);

            Assert.That(accounting.GetAccountBalance("debit-account"), Is.EqualTo(-100));
            Assert.That(accounting.GetAccountBalance("credit-account"), Is.EqualTo(100));
        }
Esempio n. 2
0
 public void InitialBalanceShouldBeZero()
 {
     var accounting = new Accounting();
     Assert.That(accounting.GetAccountBalance("my-account"), Is.EqualTo(0));
 }