*** Settings ***
Documentation     Integration tests for depth/breadth projection system
Library           helper_depth_breadth_projection.py

*** Test Cases ***
ProjectionSpec Can Be Created
    [Documentation]    Verify ProjectionSpec model creation
    ${result}=    Create Projection Spec    class://Auth    2    9
    Should Be True    ${result}

ProjectedNode Can Be Created
    [Documentation]    Verify ProjectedNode model creation
    ${result}=    Create Projected Node    class://Foo    1    4
    Should Be True    ${result}

Projector Performs BFS Traversal
    [Documentation]    DepthBreadthProjector BFS from focus
    ${count}=    Project And Count Nodes    A    2    9
    Should Be Equal As Integers    ${count}    3

Projector Applies Depth Gradient
    [Documentation]    Verify gradient reduces depth at distance
    ${result}=    Project With Gradient    A    2    9
    Should Be True    ${result}

Projector Converts To Fragments
    [Documentation]    project_to_fragments produces ContextFragments
    ${count}=    Project To Fragments Count    A    1    4
    Should Be Equal As Integers    ${count}    2

Code Detail Map Resolves Levels
    [Documentation]    Built-in code detail map
    ${depth}=    Resolve Code Level    FULL_SOURCE
    Should Be Equal As Integers    ${depth}    9

Inheritance Computes Child Context
    [Documentation]    PlanContextInheritance produces ChildContextResult
    ${result}=    Compute Child Context Default    class://Child    1000
    Should Be True    ${result}

Inheritance With Skeleton Injection
    [Documentation]    Skeleton compressor fragments are injected
    ${count}=    Compute Child With Skeleton    class://Child    1000
    Should Be Equal As Integers    ${count}    2

Extract Child Focus From Decisions
    [Documentation]    extract_child_focus returns decisions
    ${result}=    Extract Focus    class://A    class://B
    Should Be True    ${result}
