diff --git a/tests/domain/modelling/fixtures/boiler_combi_oil_001431_after.pdf b/tests/domain/modelling/fixtures/boiler_combi_oil_001431_after.pdf new file mode 100644 index 00000000..67894d88 Binary files /dev/null and b/tests/domain/modelling/fixtures/boiler_combi_oil_001431_after.pdf differ diff --git a/tests/domain/modelling/fixtures/boiler_combi_oil_001431_before.pdf b/tests/domain/modelling/fixtures/boiler_combi_oil_001431_before.pdf new file mode 100644 index 00000000..9f7a6994 Binary files /dev/null and b/tests/domain/modelling/fixtures/boiler_combi_oil_001431_before.pdf differ diff --git a/tests/domain/modelling/fixtures/boiler_cyl_lpg_001431_after.pdf b/tests/domain/modelling/fixtures/boiler_cyl_lpg_001431_after.pdf new file mode 100644 index 00000000..6dc4fdf8 Binary files /dev/null and b/tests/domain/modelling/fixtures/boiler_cyl_lpg_001431_after.pdf differ diff --git a/tests/domain/modelling/fixtures/boiler_cyl_lpg_001431_before.pdf b/tests/domain/modelling/fixtures/boiler_cyl_lpg_001431_before.pdf new file mode 100644 index 00000000..2b7a7287 Binary files /dev/null and b/tests/domain/modelling/fixtures/boiler_cyl_lpg_001431_before.pdf differ diff --git a/tests/domain/modelling/test_elmhurst_cascade_pins.py b/tests/domain/modelling/test_elmhurst_cascade_pins.py index 9d8ce4ff..a5cec154 100644 --- a/tests/domain/modelling/test_elmhurst_cascade_pins.py +++ b/tests/domain/modelling/test_elmhurst_cascade_pins.py @@ -809,6 +809,53 @@ def test_boiler_combi_overlay_reproduces_the_relodged_after() -> None: _assert_overlay_reproduces_after(before, after, option.overlay) +def test_oil_combi_overlay_reproduces_the_relodged_after() -> None: + # Arrange — an OIL combi (fuel 28, SAP code 130, no cylinder) on a mains-gas + # street re-lodged as a gas condensing combi (fuel 28->26, code 104, fanned + # flue). Validates the non-gas -> gas conversion: the upgrade targets gas + # because a mains-gas connection is present (ADR-0024 revised). Controls are + # already adequate (2106), so they are unchanged. + before: EpcPropertyData = parse_recommendation_summary( + "boiler_combi_oil_001431_before.pdf" + ) + after: EpcPropertyData = parse_recommendation_summary( + "boiler_combi_oil_001431_after.pdf" + ) + recommendation: Recommendation | None = recommend_heating(before, _AnyProduct()) + assert recommendation is not None + option = next( + o for o in recommendation.options if o.measure_type == "gas_boiler_upgrade" + ) + + # Act / Assert + _assert_overlay_reproduces_after(before, after, option.overlay) + + +def test_boiler_with_already_insulated_cylinder_overlay_reproduces_the_relodged_after() -> None: + # Arrange — a gas boiler heating an ALREADY-jacketed cylinder (insulation + # type 2 / 80 mm) with no thermostat, re-lodged as a new gas condensing + # boiler (code 102) with a cylinder thermostat added. Validates the cylinder + # path's skip-jacket branch (the 80 mm jacket is not re-applied) while the + # thermostat is still added. (Sourced from an LPG re-lodgement; the Summary + # mapper reads its fuel as mains gas — fuel 26 — so this exercises the gas + # cylinder path, not a true LPG conversion. The LPG fuel-mapping gap is a + # separate mapper-front concern.) + before: EpcPropertyData = parse_recommendation_summary( + "boiler_cyl_lpg_001431_before.pdf" + ) + after: EpcPropertyData = parse_recommendation_summary( + "boiler_cyl_lpg_001431_after.pdf" + ) + recommendation: Recommendation | None = recommend_heating(before, _AnyProduct()) + assert recommendation is not None + option = next( + o for o in recommendation.options if o.measure_type == "gas_boiler_upgrade" + ) + + # Act / Assert + _assert_overlay_reproduces_after(before, after, option.overlay) + + # --- Solar PV cascade pins (ADR-0026) ------------------------------------- # # The solar before/after Summaries lodge *synthetic* PV arrays (each 1.00 kWp,