"""Contract tests for BSDPlatform — verifies it fulfils Platform. Runs on Linux. Tests verify the interface exists. """ from __future__ import annotations from trcc.adapters.system.bsd_platform import BSDPlatform from trcc.core.ports import Platform class TestBSDPlatformIsPlatform: def test_is_os_platform(self): assert isinstance(BSDPlatform(), Platform) class TestBSDPlatformContract: def setup_method(self): self._p = BSDPlatform() def test_create_detect_fn_exists(self): assert callable(self._p.create_detect_fn) def test_create_sensor_enumerator_exists(self): assert callable(self._p.create_sensor_enumerator) def test_autostart_methods_exist(self): assert callable(self._p.autostart_enable) assert callable(self._p.autostart_disable) assert callable(self._p.autostart_enabled) def test_get_memory_info_exists(self): assert callable(self._p.get_memory_info) def test_get_disk_info_exists(self): assert callable(self._p.get_disk_info) def test_config_dir_returns_string(self): assert isinstance(self._p.config_dir(), str) def test_distro_name_returns_string(self): assert isinstance(self._p.distro_name(), str)