"""Tests for MCP Prompts.

Tests cover:
- Prompt registration
- Prompt message structure
- Prompt content validation
"""
from __future__ import annotations



# =============================================================================
# Prompt Registration Tests
# =============================================================================

class TestPromptRegistration:
    """Tests for prompt registration."""

    def test_register_prompts_callable(self):
        """Test that register_prompts is callable."""
        from src.prompts import register_prompts
        assert callable(register_prompts)

    def test_register_prompts_no_error(self):
        """Test that prompts register without error."""
        from mcp.server.fastmcp import FastMCP
        from src.prompts import register_prompts
        
        test_mcp = FastMCP("test")
        # Should not raise any exception
        register_prompts(test_mcp)


# =============================================================================
# Campaign Optimizer Prompt Tests
# =============================================================================

class TestCampaignOptimizerPrompt:
    """Tests for campaign_optimizer prompt."""

    def test_prompt_registered(self):
        """Test campaign_optimizer prompt is registered."""
        from mcp.server.fastmcp import FastMCP
        from src.prompts import register_prompts
        
        test_mcp = FastMCP("test")
        register_prompts(test_mcp)
        
        # Prompt should be registered (verified through registration)


# =============================================================================
# Fraud Detector Prompt Tests
# =============================================================================

class TestFraudDetectorPrompt:
    """Tests for fraud_detector prompt."""

    def test_prompt_registered(self):
        """Test fraud_detector prompt is registered."""
        from mcp.server.fastmcp import FastMCP
        from src.prompts import register_prompts
        
        test_mcp = FastMCP("test")
        register_prompts(test_mcp)


# =============================================================================
# Budget Optimizer Prompt Tests
# =============================================================================

class TestBudgetOptimizerPrompt:
    """Tests for budget_optimizer prompt."""

    def test_prompt_registered(self):
        """Test budget_optimizer prompt is registered."""
        from mcp.server.fastmcp import FastMCP
        from src.prompts import register_prompts
        
        test_mcp = FastMCP("test")
        register_prompts(test_mcp)


# =============================================================================
# v24 Compliance Prompt Tests
# =============================================================================

class TestV24CompliancePrompt:
    """Tests for v24_compliance_check prompt."""

    def test_prompt_registered(self):
        """Test v24_compliance_check prompt is registered."""
        from mcp.server.fastmcp import FastMCP
        from src.prompts import register_prompts
        
        test_mcp = FastMCP("test")
        register_prompts(test_mcp)


# =============================================================================
# Executive Dashboard Prompt Tests
# =============================================================================

class TestExecutiveDashboardPrompt:
    """Tests for executive_dashboard prompt."""

    def test_prompt_registered(self):
        """Test executive_dashboard prompt is registered."""
        from mcp.server.fastmcp import FastMCP
        from src.prompts import register_prompts
        
        test_mcp = FastMCP("test")
        register_prompts(test_mcp)


# =============================================================================
# Prompt Content Validation
# =============================================================================

class TestPromptContent:
    """Tests for prompt content validation."""

    def test_all_prompts_have_workflow_steps(self):
        """Test that all prompts include workflow steps."""
        # This would require accessing the prompt functions directly
        # and validating their content structure
        pass

    def test_prompts_reference_valid_tools(self):
        """Test that prompts reference valid tool names."""
        # This would validate that tool names in prompts
        # match actual registered tools
        pass
