Beispiel #1
0
        public void BalanceAtSpecificDateWithNoTransactions()
        {
            var account = new CashAccount();

            account.Deposit(new Date(2000, 01, 01), 100.00m, "");
            account.Deposit(new Date(2000, 02, 01), 200.00m, "");
            account.Withdraw(new Date(2000, 03, 01), 50.00m, "");

            account.Balance(new Date(2000, 02, 15)).Should().Be(300.00m);
        }
Beispiel #2
0
        public void BalanceAfterLastTransaction()
        {
            var account = new CashAccount();

            account.Deposit(new Date(2000, 01, 01), 100.00m, "");
            account.Deposit(new Date(2000, 02, 01), 200.00m, "");
            account.Withdraw(new Date(2000, 03, 01), 50.00m, "");

            account.Balance(new Date(2002, 01, 01)).Should().Be(250.00m);
        }
Beispiel #3
0
        public void BalanceNoTransactionsOnThatDate()
        {
            var account = new CashAccount();

            account.Deposit(new Date(2000, 01, 01), 100.00m, "");
            account.Deposit(new Date(2000, 02, 01), 200.00m, "");
            account.Deposit(new Date(2000, 02, 01), 60.00m, "");
            account.Withdraw(new Date(2000, 03, 01), 50.00m, "");

            account.Balance(new Date(2000, 02, 15)).Should().Be(360.00m);
        }
Beispiel #4
0
        public void BalanceWithNoTransactions()
        {
            var account = new CashAccount();

            account.Balance().Should().Be(0);
        }