diff --git a/tests/domain/epc/test_main_fuel_overlay.py b/tests/domain/epc/test_main_fuel_overlay.py index 1b554f5b..2ffd9e29 100644 --- a/tests/domain/epc/test_main_fuel_overlay.py +++ b/tests/domain/epc/test_main_fuel_overlay.py @@ -9,6 +9,10 @@ from __future__ import annotations import pytest from domain.epc.property_overlays.main_fuel_overlay import fuel_overlay_for +from domain.modelling.scoring.overlay_applicator import apply_simulations +from tests.domain.sap10_calculator.worksheet._elmhurst_worksheet_000490 import ( + build_epc, +) def test_mains_gas_overlays_the_primary_fuel() -> None: @@ -59,3 +63,16 @@ def test_unresolvable_fuel_produces_no_overlay(main_fuel_value: str) -> None: # Assert assert simulation is None + + +def test_fuel_override_remaps_the_primary_systems_fuel_on_the_epc() -> None: + # Arrange — a landlord correction that the dwelling runs on electricity. + baseline = build_epc() + overlay = fuel_overlay_for("electricity", 0) + assert overlay is not None + + # Act + result = apply_simulations(baseline, [overlay]) + + # Assert — the calculator reads the primary fuel from main_heating_details[0]. + assert result.sap_heating.main_heating_details[0].main_fuel_type == 29