diff --git a/tests/domain/epc/test_glazing_overlay.py b/tests/domain/epc/test_glazing_overlay.py index b54e134e..a5a6699e 100644 --- a/tests/domain/epc/test_glazing_overlay.py +++ b/tests/domain/epc/test_glazing_overlay.py @@ -7,6 +7,8 @@ window by `_fold_glazing`). from __future__ import annotations +import pytest + from domain.epc.property_overlays.glazing_overlay import glazing_overlay_for @@ -18,3 +20,24 @@ def test_double_glazing_post_2002_overlays_its_glazing_code() -> None: assert simulation is not None assert simulation.glazing is not None assert simulation.glazing.glazing_type == 2 + + +@pytest.mark.parametrize( + ("glazing_value", "code"), + [ + ("Single glazing", 1), + ("Double glazing, pre-2002", 3), + ("Triple glazing, 2002 or later", 9), + ("Triple glazing, pre-2002", 6), + ], +) +def test_glazing_types_decode_to_their_sap_codes( + glazing_value: str, code: int +) -> None: + # Act + simulation = glazing_overlay_for(glazing_value, 0) + + # Assert + assert simulation is not None + assert simulation.glazing is not None + assert simulation.glazing.glazing_type == code