refactor(api-core): move service registration (#275)

This commit is contained in:
Aaron Po
2026-09-03 05:19:20 -04:00
committed by GitHub
parent d6e176bcd9
commit 78ad32e93a
12 changed files with 220 additions and 201 deletions

View File

@@ -7,4 +7,4 @@ Scenario: GET request to an invalid route returns 404
Given the API is running
When I send an HTTP request "GET" to "/invalid-route"
Then the response has HTTP status 404
And the response JSON should have "message" equal "Route not found."
And the response JSON should have "message" equal "Are you lost? That route does not exist."

View File

@@ -15,7 +15,7 @@ public abstract class ApiStepsBase(ScenarioContext scenario)
protected const string ResponseKey = "response";
protected const string ResponseBodyKey = "responseBody";
protected TestApiFactory GetFactory()
internal TestApiFactory GetFactory()
{
TestApiFactory? factory = Scenario.TryGetValue<TestApiFactory>(
FactoryKey,

View File

@@ -1,3 +1,4 @@
using API.Core;
using API.Specs.Mocks;
using Features.Emails.Services;
using Infrastructure.Email;
@@ -7,7 +8,7 @@ using Microsoft.Extensions.DependencyInjection;
namespace API.Specs;
public class TestApiFactory : WebApplicationFactory<Program>
internal class TestApiFactory : WebApplicationFactory<Program>
{
protected override void ConfigureWebHost(IWebHostBuilder builder)
{