Refactor code structure and optimize performance across multiple modules
This commit is contained in:
@@ -7,6 +7,8 @@ using StellaOps.Router.Common.Frames;
|
||||
using StellaOps.Router.Common.Models;
|
||||
using Xunit;
|
||||
|
||||
|
||||
using StellaOps.TestKit;
|
||||
namespace StellaOps.Microservice.Tests;
|
||||
|
||||
public sealed class RequestDispatcherTests
|
||||
@@ -17,7 +19,8 @@ public sealed class RequestDispatcherTests
|
||||
PropertyNameCaseInsensitive = true
|
||||
};
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task DispatchAsync_WhenEndpointNotFound_Returns404()
|
||||
{
|
||||
var registry = new EndpointRegistry();
|
||||
@@ -44,7 +47,8 @@ public sealed class RequestDispatcherTests
|
||||
Encoding.UTF8.GetString(response.Payload.Span).Should().Be("Not Found");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task DispatchAsync_WhenBodyEmpty_BindsFromPathAndQueryParameters()
|
||||
{
|
||||
var registry = new EndpointRegistry();
|
||||
@@ -86,7 +90,8 @@ public sealed class RequestDispatcherTests
|
||||
dto.Filter.Should().Be("active");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait("Category", TestCategories.Unit)]
|
||||
[Fact]
|
||||
public async Task DispatchAsync_WhenBodyPresent_PathAndQueryOverrideJsonProperties()
|
||||
{
|
||||
var registry = new EndpointRegistry();
|
||||
|
||||
Reference in New Issue
Block a user