test: add xUnit test coverage for API controllers and client services
Create ChatAgent.Api.Tests and ChatAgent.Client.Tests projects with xUnit and Moq. Test HealthController (200 + valid response), ChatController (SSE streaming with mocked upstream, error handling), and ChatApiClient (delta parsing, error events, health endpoint). 6 tests, all passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -66,3 +66,8 @@ app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
|
||||
// This partial class declaration makes the auto-generated Program class public,
|
||||
// which is required by WebApplicationFactory<Program> in integration tests.
|
||||
// Without this, the test project cannot reference the entry point type.
|
||||
public partial class Program { }
|
||||
|
||||
Reference in New Issue
Block a user