From d323fe32773abbb6a6e3402c3efcc052f4daf8af Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 23 Apr 2026 14:30:20 +0000 Subject: [PATCH] =?UTF-8?q?Map=20floor=20construction=20properties=20?= =?UTF-8?q?=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epc/domain/tests/test_from_site_notes.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index 772d5e18..abc2742b 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -570,3 +570,36 @@ class TestFromSiteNotesVentilation: def test_draught_lobby(self, result: EpcPropertyData) -> None: # ventilation.draught_lobby: false assert result.sap_ventilation.draught_lobby is False + + +class TestFromSiteNotesFloorConstruction: + """ + Fixture: pashub_rdsap_site_notes_example1.json + Floor: Suspended not timber, As Built insulation, Ground Floor type. + """ + + @pytest.fixture + def survey(self) -> PasHubRdSapSiteNotes: + return from_dict( + PasHubRdSapSiteNotes, load("pashub_rdsap_site_notes_example1.json") + ) + + @pytest.fixture + def result(self, survey: PasHubRdSapSiteNotes) -> EpcPropertyData: + return EpcPropertyDataMapper.from_site_notes(survey) + + def test_floor_type(self, result: EpcPropertyData) -> None: + # building_construction.floor.floor_type: "Ground Floor" + assert result.sap_building_parts[0].floor_type == "Ground Floor" + + def test_floor_construction_type(self, result: EpcPropertyData) -> None: + # building_construction.floor.floor_construction: "Suspended, not timber" + assert result.sap_building_parts[0].floor_construction_type == "Suspended, not timber" + + def test_floor_insulation_type_str(self, result: EpcPropertyData) -> None: + # building_construction.floor.floor_insulation_type: "As Built" + assert result.sap_building_parts[0].floor_insulation_type_str == "As Built" + + def test_floor_u_value_known(self, result: EpcPropertyData) -> None: + # building_construction.floor.floor_u_value_known: false + assert result.sap_building_parts[0].floor_u_value_known is False