Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -10,6 +10,7 @@ using StellaOps.Findings.Ledger.Infrastructure.Merkle;
|
||||
using StellaOps.Findings.Ledger.Services;
|
||||
using Xunit;
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Findings.Ledger.Tests;
|
||||
|
||||
public sealed class LedgerEventWriteServiceTests
|
||||
@@ -23,7 +24,8 @@ public sealed class LedgerEventWriteServiceTests
|
||||
_service = new LedgerEventWriteService(_repository, _scheduler, NullLogger<LedgerEventWriteService>.Instance);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task AppendAsync_ComputesExpectedHashes()
|
||||
{
|
||||
var draft = CreateDraft();
|
||||
@@ -39,7 +41,8 @@ public sealed class LedgerEventWriteServiceTests
|
||||
result.Record.PreviousHash.Should().Be(LedgerEventConstants.EmptyHash);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task AppendAsync_ReturnsConflict_WhenSequenceOutOfOrder()
|
||||
{
|
||||
var initial = CreateDraft();
|
||||
@@ -53,7 +56,8 @@ public sealed class LedgerEventWriteServiceTests
|
||||
result.Errors.Should().NotBeEmpty();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task AppendAsync_ReturnsIdempotent_WhenExistingRecordMatches()
|
||||
{
|
||||
var draft = CreateDraft();
|
||||
|
||||
Reference in New Issue
Block a user