diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1499030 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# .NET build output +bin/ +obj/ +[Dd]ebug/ +[Rr]elease/ +*.user + +# Test results / coverage +[Tt]est[Rr]esults/ +*.trx +coverage*.json +coverage*.xml +*.coverage + +# Rider / VS / VS Code +.idea/ +.vs/ +.vscode/ + +# Node / Angular (added as the frontend lands) +node_modules/ +dist/ +.angular/ + +# OS +.DS_Store +Thumbs.db diff --git a/global.json b/global.json new file mode 100644 index 0000000..ab84b81 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "10.0.203", + "rollForward": "latestFeature" + } +} diff --git a/services/bff/Bff.Api/Bff.Api.csproj b/services/bff/Bff.Api/Bff.Api.csproj new file mode 100644 index 0000000..a3a34b6 --- /dev/null +++ b/services/bff/Bff.Api/Bff.Api.csproj @@ -0,0 +1,9 @@ + + + + net10.0 + enable + enable + + + diff --git a/services/bff/Bff.Api/Program.cs b/services/bff/Bff.Api/Program.cs new file mode 100644 index 0000000..5267f53 --- /dev/null +++ b/services/bff/Bff.Api/Program.cs @@ -0,0 +1,9 @@ +var builder = WebApplication.CreateBuilder(args); +var app = builder.Build(); + +app.MapGet("/", () => "BFF placeholder"); + +app.Run(); + +// Exposed so the test host (WebApplicationFactory) can boot the app. +public partial class Program; diff --git a/services/bff/Bff.Tests/Bff.Tests.csproj b/services/bff/Bff.Tests/Bff.Tests.csproj new file mode 100644 index 0000000..e6b2ace --- /dev/null +++ b/services/bff/Bff.Tests/Bff.Tests.csproj @@ -0,0 +1,26 @@ + + + + net10.0 + enable + enable + false + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/services/bff/Bff.Tests/HealthEndpointTests.cs b/services/bff/Bff.Tests/HealthEndpointTests.cs new file mode 100644 index 0000000..2244534 --- /dev/null +++ b/services/bff/Bff.Tests/HealthEndpointTests.cs @@ -0,0 +1,20 @@ +using System.Net; +using Microsoft.AspNetCore.Mvc.Testing; + +namespace Bff.Tests; + +public class HealthEndpointTests(WebApplicationFactory factory) + : IClassFixture> +{ + [Fact] + public async Task Health_endpoint_returns_200_and_reports_healthy() + { + var client = factory.CreateClient(); + + var response = await client.GetAsync("/health"); + + Assert.Equal(HttpStatusCode.OK, response.StatusCode); + var body = await response.Content.ReadAsStringAsync(); + Assert.Contains("Healthy", body); + } +} diff --git a/services/bff/Bff.slnx b/services/bff/Bff.slnx new file mode 100644 index 0000000..5680319 --- /dev/null +++ b/services/bff/Bff.slnx @@ -0,0 +1,4 @@ + + + +