| 1 | using AgentForge.Abstractions; |
| 2 | using AgentForge.Plugin.RepositoryImport.GitHub.Core; |
| 3 | using Microsoft.Extensions.DependencyInjection; |
| 4 | |
| 5 | namespace AgentForge.Tests; |
| 6 | |
| 7 | public sealed class ForgeGitHubImportDiTests |
| 8 | { |
| 9 | [Fact] |
| 10 | public void AddGitHubImportCore_is_idempotent() |
| 11 | { |
| 12 | var services = new ServiceCollection(); |
| 13 | services.AddGitHubImportCore(); |
| 14 | services.AddGitHubImportCore(); |
| 15 | services.AddGitHubImportCore(); |
| 16 | |
| 17 | using var provider = services.BuildServiceProvider(); |
| 18 | Assert.Single(provider.GetServices<ForgeGitHubImportCoreServicesMarker>()); |
| 19 | } |
| 20 | |
| 21 | [Fact] |
| 22 | public async Task Ams_showcase_bundle_starts_with_all_github_import_plugins() |
| 23 | { |
| 24 | using var factory = new ForgeWebApplicationFactory { PluginBundle = "ams-showcase" }; |
| 25 | using var client = factory.CreateClient(); |
| 26 | |
| 27 | var response = await client.GetAsync("/api/v1/capabilities"); |
| 28 | response.EnsureSuccessStatusCode(); |
| 29 | } |
| 30 | } |
| 31 | |
View only · write via MCP/CIDE