Improve testing and some cleanup refactoring.

This commit is contained in:
2026-07-29 11:07:12 +02:00
parent 249a166d07
commit 44846eaa13
15 changed files with 253 additions and 96 deletions
@@ -31,13 +31,10 @@ public static class ApplyFeeHandler
{
var updatedSource = context.Source.ApplyPosting(cmd.Amount, EntryType.Debit);
var updatedRevenue = context.Destination.ApplyPosting(cmd.Amount, EntryType.Credit);
var serviceFee = 0.5m;
var lines = new List<JournalLine>
{
new(updatedSource.Id, cmd.Amount, EntryType.Debit),
new(updatedRevenue.Id, cmd.Amount - serviceFee, EntryType.Credit),
new(updatedRevenue.Id, serviceFee, EntryType.Credit)
new(updatedSource.Id, cmd.Amount, EntryType.Debit), new(updatedRevenue.Id, cmd.Amount, EntryType.Credit)
};
var journalEntry = BalancedJournal.Create(