Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit b4fc66feb6
3353 changed files with 88254 additions and 1590657 deletions

View File

@@ -5,6 +5,7 @@ using StellaOps.Notify.Storage.Postgres.Models;
using StellaOps.Notify.Storage.Postgres.Repositories;
using Xunit;
using StellaOps.TestKit;
namespace StellaOps.Notify.Storage.Postgres.Tests;
/// <summary>
@@ -40,7 +41,8 @@ public sealed class NotificationDeliveryFlowTests : IAsyncLifetime
public Task InitializeAsync() => _fixture.TruncateAllTablesAsync();
public Task DisposeAsync() => Task.CompletedTask;
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task DeliveryFlow_CompleteLifecycle_PendingToDelivered()
{
// Arrange - Create channel
@@ -129,7 +131,8 @@ public sealed class NotificationDeliveryFlowTests : IAsyncLifetime
finalPending.Should().NotContain(d => d.Id == delivery.Id);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task DeliveryFlow_FailureAndRetry_TracksErrorState()
{
// Arrange
@@ -167,7 +170,8 @@ public sealed class NotificationDeliveryFlowTests : IAsyncLifetime
failed.Attempt.Should().BeGreaterThanOrEqualTo(1);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task DeliveryFlow_MultipleChannels_IndependentDeliveries()
{
// Arrange - Create two channels
@@ -232,7 +236,8 @@ public sealed class NotificationDeliveryFlowTests : IAsyncLifetime
slack.Status.Should().Be(DeliveryStatus.Failed);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task DeliveryFlow_StatsAccumulation_CorrectAggregates()
{
// Arrange
@@ -290,7 +295,8 @@ public sealed class NotificationDeliveryFlowTests : IAsyncLifetime
stats.Failed.Should().Be(2);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task DeliveryFlow_DeterministicOrdering_ConsistentResults()
{
// Arrange
@@ -332,7 +338,8 @@ public sealed class NotificationDeliveryFlowTests : IAsyncLifetime
ids2.Should().Equal(ids3);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task DeliveryFlow_AuditTrail_RecordsActions()
{
// Arrange
@@ -372,7 +379,8 @@ public sealed class NotificationDeliveryFlowTests : IAsyncLifetime
audits[0].Action.Should().Be("channel.created");
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task DeliveryFlow_DisabledChannel_NotQueried()
{
// Arrange