Fix tests with minimal host

Signed-off-by: Safia Abdalla <safia@safia.rocks>
This commit is contained in:
Safia Abdalla 2024-03-06 10:25:16 -08:00
parent 2863974585
commit 9a715187c9
2 changed files with 7 additions and 3 deletions

View File

@ -17,3 +17,7 @@ var app = builder.Build();
app.MapControllers(); app.MapControllers();
app.Run(); app.Run();
// Generated `Program` class when using top-level statements
// is internal by default. Make this `public` here for tests.
public partial class Program { }

View File

@ -13,11 +13,11 @@ using Xunit;
namespace CloudNative.CloudEvents.IntegrationTests.AspNetCore namespace CloudNative.CloudEvents.IntegrationTests.AspNetCore
{ {
public class CloudEventControllerTests : IClassFixture<WebApplicationFactory<Startup>> public class CloudEventControllerTests : IClassFixture<WebApplicationFactory<Program>>
{ {
private readonly WebApplicationFactory<Startup> _factory; private readonly WebApplicationFactory<Program> _factory;
public CloudEventControllerTests(WebApplicationFactory<Startup> factory) public CloudEventControllerTests(WebApplicationFactory<Program> factory)
{ {
_factory = factory; _factory = factory;
} }