diff --git a/tests/domain/epc/test_roof_party_ceiling_guard.py b/tests/domain/epc/test_roof_party_ceiling_guard.py index 3c155f23c..9152b655e 100644 --- a/tests/domain/epc/test_roof_party_ceiling_guard.py +++ b/tests/domain/epc/test_roof_party_ceiling_guard.py @@ -1,5 +1,7 @@ from __future__ import annotations +import pytest + from domain.epc.property_overrides.roof_type import RoofType from domain.epc.property_overrides.roof_party_ceiling_guard import ( roof_party_ceiling_guard, @@ -16,3 +18,25 @@ def test_party_ceiling_marker_with_a_trailing_depth_resolves_to_the_party_ceilin # Assert — it is a party ceiling (~0 heat loss), not a Pitched roof. assert result is RoofType.ADJACENT_ANOTHER_DWELLING_ABOVE + + +@pytest.mark.parametrize( + ("description", "expected"), + [ + ("same dwelling above: unknown", RoofType.ADJACENT_SAME_DWELLING_ABOVE), + ("other premises above", RoofType.ADJACENT_OTHER_PREMISES_ABOVE), + ("another premises above: 150mm", RoofType.ADJACENT_ANOTHER_PREMISES_ABOVE), + # the unspaced source form and the "Another Premises Above" member value + # both normalise to the same marker. + ("Another Premises Above", RoofType.ADJACENT_ANOTHER_PREMISES_ABOVE), + ("samedwellingabove: 300mm", RoofType.ADJACENT_SAME_DWELLING_ABOVE), + ], +) +def test_every_party_ceiling_marker_variant_resolves_to_its_member( + description: str, expected: RoofType +) -> None: + # Act + result = roof_party_ceiling_guard(description) + + # Assert + assert result is expected