svrnty-mcp-gateway/tests/Svrnty.MCP.Gateway.Core.Tests/Models/ServerHealthStatusTests.cs
Svrnty a4a1dd2e38 docs: comprehensive AI coding assistant research and MCP-first implementation plan
Research conducted on modern AI coding assistants (Cursor, GitHub Copilot, Cline,
Aider, Windsurf, Replit Agent) to understand architecture patterns, context management,
code editing workflows, and tool use protocols.

Key Decision: Pivoted from building full CLI (40-50h) to validation-driven MCP-first
approach (10-15h). Build 5 core CODEX MCP tools that work with ANY coding assistant,
validate adoption over 2-4 weeks, then decide on full CLI if demand proven.

Files:
- research/ai-systems/modern-coding-assistants-architecture.md (comprehensive research)
- research/ai-systems/codex-coding-assistant-implementation-plan.md (original CLI plan, preserved)
- research/ai-systems/codex-mcp-tools-implementation-plan.md (approved MCP-first plan)
- ideas/registry.json (updated with approved MCP tools proposal)

Architech Validation: APPROVED with pivot to MCP-first approach
Human Decision: Approved (pragmatic validation-driven development)

Next: Begin Phase 1 implementation (10-15 hours, 5 core MCP tools)

🤖 Generated with CODEX Research System

Co-Authored-By: The Archivist <archivist@codex.svrnty.io>
Co-Authored-By: The Architech <architech@codex.svrnty.io>
Co-Authored-By: Mathias Beaulieu-Duncan <mat@svrnty.io>
2025-10-22 21:00:34 -04:00

67 lines
1.8 KiB
C#

using Xunit;
using OpenHarbor.MCP.Gateway.Core.Models;
namespace OpenHarbor.MCP.Gateway.Core.Tests.Models;
/// <summary>
/// Unit tests for ServerHealthStatus model following TDD approach.
/// Tests server health representation.
/// </summary>
public class ServerHealthStatusTests
{
[Fact]
public void ServerHealthStatus_Healthy_CreatesSuccessfully()
{
// Arrange
var now = DateTime.UtcNow;
// Act
var status = new ServerHealthStatus
{
ServerId = "server-1",
ServerName = "Test Server",
IsHealthy = true,
LastCheck = now,
ResponseTime = TimeSpan.FromMilliseconds(25)
};
// Assert
Assert.Equal("server-1", status.ServerId);
Assert.Equal("Test Server", status.ServerName);
Assert.True(status.IsHealthy);
Assert.Equal(now, status.LastCheck);
Assert.Equal(25, status.ResponseTime?.TotalMilliseconds);
Assert.Null(status.ErrorMessage);
}
[Fact]
public void ServerHealthStatus_Unhealthy_IncludesErrorMessage()
{
// Arrange & Act
var status = new ServerHealthStatus
{
ServerId = "server-2",
IsHealthy = false,
LastCheck = DateTime.UtcNow,
ErrorMessage = "Connection timeout"
};
// Assert
Assert.False(status.IsHealthy);
Assert.Equal("Connection timeout", status.ErrorMessage);
Assert.Null(status.ResponseTime);
}
[Fact]
public void ServerHealthStatus_DefaultState_IsNotHealthy()
{
// Arrange & Act
var status = new ServerHealthStatus();
// Assert
Assert.False(status.IsHealthy);
Assert.Null(status.ErrorMessage);
Assert.Null(status.ResponseTime);
}
}