using System.Threading; using System.Threading.Tasks; namespace io.github.hatayama.uLoopMCP { /// /// Test execution tool handler - Type-safe implementation using Schema and Response /// Executes tests using Unity Test Runner and returns the results /// /// /// This Tool class delegates to RunTestsUseCase for business logic execution, /// following the UseCase + Tool pattern for separation of concerns. /// /// Related classes: /// - RunTestsUseCase: Business logic and orchestration /// - RunTestsSchema: Type-safe parameter schema /// - RunTestsResponse: Type-safe response structure /// [McpTool( Description = "Execute Unity Test Runner with advanced filtering options - exact test methods, regex patterns for classes/namespaces, assembly filtering" )] public class RunTestsTool : AbstractUnityTool { public override string ToolName => McpConstants.TOOL_NAME_RUN_TESTS; protected override async Task ExecuteAsync(RunTestsSchema parameters, CancellationToken ct) { // Create and execute RunTestsUseCase instance RunTestsUseCase useCase = new(); return await useCase.ExecuteAsync(parameters, ct); } } }