"""Basic smoke tests for shared schemas."""
from services.shared.schemas import (
    ActionType,
    CatalystType,
    CompanyImpact,
    DocumentIntelligence,
    DocumentMetadata,
    Recommendation,
    Sentiment,
    TrendSummary,
)


def test_document_intelligence_defaults():
    di = DocumentIntelligence()
    assert di.document_id
    assert di.confidence == 0.5
    assert di.companies == []


def test_company_impact_validation():
    ci = CompanyImpact(
        ticker="AAPL",
        company_name="Apple Inc.",
        relevance=0.9,
        sentiment=Sentiment.POSITIVE,
        impact_score=0.7,
        impact_horizon="1d_30d",
        catalyst_type=CatalystType.EARNINGS,
    )
    assert ci.ticker == "AAPL"
    assert ci.sentiment == Sentiment.POSITIVE


def test_trend_summary_defaults():
    ts = TrendSummary()
    assert ts.trend_strength == 0.5
    assert ts.contradiction_score == 0.0


def test_recommendation_defaults():
    rec = Recommendation()
    assert rec.action == ActionType.WATCH
    assert rec.position_sizing.portfolio_pct == 0.02


def test_document_metadata_defaults():
    dm = DocumentMetadata()
    assert dm.document_id
    assert dm.language == "en"
