Issue #1: scaffold gateway solution and projects

This commit is contained in:
Joseph Doherty
2026-04-26 15:49:05 -04:00
parent 81339633d9
commit a45f439029
18 changed files with 385 additions and 0 deletions
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using MxGateway.Server;
namespace MxGateway.Tests.Gateway;
public sealed class GatewayApplicationTests
{
[Fact]
public void Build_MapsLiveHealthEndpoint()
{
WebApplication app = GatewayApplication.Build([]);
RouteEndpoint endpoint = Assert.Single(
((IEndpointRouteBuilder)app).DataSources
.SelectMany(dataSource => dataSource.Endpoints)
.OfType<RouteEndpoint>(),
candidate => candidate.RoutePattern.RawText == "/health/live");
Assert.Equal("LiveHealth", endpoint.Metadata.GetMetadata<IEndpointNameMetadata>()?.EndpointName);
}
}