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

@@ -14,6 +14,8 @@ using Microsoft.Extensions.DependencyInjection;
using StellaOps.Notify.Engine;
using StellaOps.Notify.Models;
using StellaOps.TestKit;
namespace StellaOps.Notify.WebService.Tests;
public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Program>>, IAsyncLifetime
@@ -78,7 +80,8 @@ public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Pro
public Task DisposeAsync() => Task.CompletedTask;
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task RuleCrudLifecycle()
{
var client = _factory.CreateClient();
@@ -100,7 +103,8 @@ public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Pro
Assert.Equal(HttpStatusCode.NotFound, afterDelete.StatusCode);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task ChannelTemplateDeliveryAndAuditFlows()
{
var client = _factory.CreateClient();
@@ -170,7 +174,8 @@ public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Pro
Assert.Equal(HttpStatusCode.NotFound, digestAfterDelete.StatusCode);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task LockEndpointsAllowAcquireAndRelease()
{
var client = _factory.CreateClient();
@@ -198,7 +203,8 @@ public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Pro
Assert.True(secondContent? ["acquired"]?.GetValue<bool>());
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task ChannelTestSendReturnsPreview()
{
var client = _factory.CreateClient();
@@ -243,7 +249,8 @@ public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Pro
Assert.Equal(json["traceId"]?.GetValue<string>(), metadata?["traceId"]?.GetValue<string>());
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task ChannelTestSendHonoursRateLimit()
{
using var limitedFactory = _factory.WithWebHostBuilder(builder =>
@@ -280,7 +287,8 @@ public sealed class CrudEndpointsTests : IClassFixture<WebApplicationFactory<Pro
Assert.NotNull(second.Headers.RetryAfter);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task ChannelTestSendUsesRegisteredProvider()
{
var providerName = typeof(FakeSlackTestProvider).FullName!;