public void Execute_ForDebitIncreaseAccount_ShouldReturnSumOfDebitMinusCredit()
        {
            var account = Repository.Save(new AssetAccount());
            var debitEntry = GetEntry(DateTime.Today, 1000, account, EntryType.Debit);
            var creditEntry = GetEntry(DateTime.Today, 200, account, EntryType.Credit);

            var command = new GetAccountBalanceForDateCommand(Repository, SessionFactory);
            var result = command.Execute(account.Id, DateTime.Today);

            Assert.That(result, Is.EqualTo(debitEntry.Amount - creditEntry.Amount));
        }
        public void Execute_ShouldReturnAmountFromCurrentAndPastEntriesRelativeToSpecifiedDate()
        {
            var account = Repository.Save(new AssetAccount());
            var entryInThePast = GetEntry(DateTime.Today.AddDays(-7), 100, account);
            var entryFromToday = GetEntry(DateTime.Today, 1000, account);
            var entryInTheFuture = GetEntry(DateTime.Today.AddDays(7), 10000, account);

            var command = new GetAccountBalanceForDateCommand(Repository, SessionFactory);
            var result = command.Execute(account.Id, DateTime.Today.AddDays(7));

            Assert.That(result, Is.EqualTo(entryInThePast.Amount + entryFromToday.Amount + entryInTheFuture.Amount));
        }