"""Shared fixtures for mcgibs tests."""

import json
from pathlib import Path

import pytest

from mcgibs.taxonomy import Taxonomy

FIXTURES_DIR = Path(__file__).parent / "fixtures"


@pytest.fixture
def capabilities_xml() -> str:
    return (FIXTURES_DIR / "capabilities_sample.xml").read_text()


@pytest.fixture
def colormap_xml() -> str:
    return (FIXTURES_DIR / "colormap_sample.xml").read_text()


@pytest.fixture
def layer_metadata_json() -> str:
    return (FIXTURES_DIR / "layer_metadata_sample.json").read_text()


@pytest.fixture
def taxonomy_sample() -> Taxonomy:
    data = json.loads((FIXTURES_DIR / "taxonomy_sample.json").read_text())
    return Taxonomy(data)
