# tests/unit/models/memory/test_enums.py
"""Unit tests for memory model enums."""

from app.models.memory.enums import (
    ConsolidationStatus,
    ConsolidationType,
    EpisodeOutcome,
    ScopeType,
)


class TestScopeType:
    """Tests for ScopeType enum."""

    def test_all_values_exist(self) -> None:
        """Test all expected scope types exist."""
        assert ScopeType.GLOBAL.value == "global"
        assert ScopeType.PROJECT.value == "project"
        assert ScopeType.AGENT_TYPE.value == "agent_type"
        assert ScopeType.AGENT_INSTANCE.value == "agent_instance"
        assert ScopeType.SESSION.value == "session"

    def test_scope_count(self) -> None:
        """Test we have exactly 5 scope types."""
        assert len(ScopeType) == 5


class TestEpisodeOutcome:
    """Tests for EpisodeOutcome enum."""

    def test_all_values_exist(self) -> None:
        """Test all expected outcome values exist."""
        assert EpisodeOutcome.SUCCESS.value == "success"
        assert EpisodeOutcome.FAILURE.value == "failure"
        assert EpisodeOutcome.PARTIAL.value == "partial"

    def test_outcome_count(self) -> None:
        """Test we have exactly 3 outcome types."""
        assert len(EpisodeOutcome) == 3


class TestConsolidationType:
    """Tests for ConsolidationType enum."""

    def test_all_values_exist(self) -> None:
        """Test all expected consolidation types exist."""
        assert ConsolidationType.WORKING_TO_EPISODIC.value == "working_to_episodic"
        assert ConsolidationType.EPISODIC_TO_SEMANTIC.value == "episodic_to_semantic"
        assert (
            ConsolidationType.EPISODIC_TO_PROCEDURAL.value == "episodic_to_procedural"
        )
        assert ConsolidationType.PRUNING.value == "pruning"

    def test_consolidation_count(self) -> None:
        """Test we have exactly 4 consolidation types."""
        assert len(ConsolidationType) == 4


class TestConsolidationStatus:
    """Tests for ConsolidationStatus enum."""

    def test_all_values_exist(self) -> None:
        """Test all expected status values exist."""
        assert ConsolidationStatus.PENDING.value == "pending"
        assert ConsolidationStatus.RUNNING.value == "running"
        assert ConsolidationStatus.COMPLETED.value == "completed"
        assert ConsolidationStatus.FAILED.value == "failed"

    def test_status_count(self) -> None:
        """Test we have exactly 4 status types."""
        assert len(ConsolidationStatus) == 4
