"""
This program has been developed by students from the bachelor Computer Science at Utrecht
University within the Software Project course.
© Copyright Utrecht University (Department of Information and Computing Sciences)
"""

from fastapi.routing import APIRoute

from control_backend.api.v1.router import api_router  # <--- corrected import


def test_router_includes_expected_paths():
    """Ensure api_router includes main router prefixes."""
    routes = [r for r in api_router.routes if isinstance(r, APIRoute)]
    paths = [r.path for r in routes]

    # Ensure at least one route under each prefix exists
    assert any(p.startswith("/robot") for p in paths)
    assert any(p.startswith("/message") for p in paths)
    assert any(p.startswith("/logs") for p in paths)
    assert any(p.startswith("/program") for p in paths)
