Improve testing and some cleanup refactoring.
This commit is contained in:
@@ -6,7 +6,10 @@ public record BalancedJournal
|
||||
{
|
||||
public JournalEntry Entry { get; }
|
||||
|
||||
private BalancedJournal(JournalEntry entry) => Entry = entry;
|
||||
private BalancedJournal(JournalEntry entry)
|
||||
{
|
||||
Entry = entry;
|
||||
}
|
||||
|
||||
public static BalancedJournal Create(Guid id, string description, DateTimeOffset createdAt, List<JournalLine> lines)
|
||||
{
|
||||
@@ -22,7 +25,7 @@ public record BalancedJournal
|
||||
);
|
||||
}
|
||||
|
||||
return new(new JournalEntry(id, description, createdAt, lines));
|
||||
return new BalancedJournal(new JournalEntry(id, description, createdAt, lines));
|
||||
}
|
||||
|
||||
public static BalancedJournal CreateReversal(JournalEntry original, string reason, DateTimeOffset now)
|
||||
|
||||
Reference in New Issue
Block a user