using System; namespace io.github.hatayama.uLoopMCP { /// /// Response schema for RunTests command /// Provides type-safe response structure /// public class RunTestsResponse : BaseToolResponse { public const string TestFrameworkUnavailableMessage = "run-tests requires the Unity Test Framework package (com.unity.test-framework). Install it via Package Manager to use test execution."; /// /// Whether test execution was successful /// public bool Success { get; set; } /// /// Test execution message /// public string Message { get; set; } /// /// Test execution completion timestamp /// public string CompletedAt { get; set; } /// /// Total number of tests executed /// public int TestCount { get; set; } /// /// Number of passed tests /// public int PassedCount { get; set; } /// /// Number of failed tests /// public int FailedCount { get; set; } /// /// Number of skipped tests /// public int SkippedCount { get; set; } /// /// Path to XML result file (if saved) /// public string XmlPath { get; set; } /// /// Create a new RunTestsResponse /// public RunTestsResponse(bool success, string message, string completedAt, int testCount, int passedCount, int failedCount, int skippedCount, string xmlPath = null) { Success = success; Message = message; CompletedAt = completedAt; TestCount = testCount; PassedCount = passedCount; FailedCount = failedCount; SkippedCount = skippedCount; XmlPath = xmlPath; } /// /// Parameterless constructor for JSON deserialization /// public RunTestsResponse() { Message = string.Empty; CompletedAt = string.Empty; XmlPath = string.Empty; } public static RunTestsResponse CreateTestFrameworkUnavailable() { return new RunTestsResponse( success: false, message: TestFrameworkUnavailableMessage, completedAt: DateTime.UtcNow.ToString("o"), testCount: 0, passedCount: 0, failedCount: 0, skippedCount: 0, xmlPath: null ); } } }