From cc6c96a33942ecedd122e0d6d32946ae9e78e32f Mon Sep 17 00:00:00 2001 From: christinehorrocks Date: Tue, 7 Jan 2025 11:39:57 +0000 Subject: [PATCH] EPBR-8023 Refactor RdSAP wrapper to hash test for England and Wales Add the new format of wrapper tests for to_hash method on England and Wales rdsaps --- .../assertions/RdSAP-Schema-17.0/to_hash.json | 200 ++++++++++++++++ .../assertions/RdSAP-Schema-17.1/to_hash.json | 200 ++++++++++++++++ .../assertions/RdSAP-Schema-18.0/to_hash.json | 203 ++++++++++++++++ .../assertions/RdSAP-Schema-19.0/to_hash.json | 201 ++++++++++++++++ .../RdSAP-Schema-20.0.0/to_hash.json | 207 ++++++++++++++++ .../SAP-Schema-11.0/to_hash_rdsap.json | 209 ++++++++++++++++ .../SAP-Schema-11.2/to_hash_rdsap.json | 209 ++++++++++++++++ .../SAP-Schema-12.0/to_hash_rdsap.json | 209 ++++++++++++++++ .../SAP-Schema-13.0/to_hash_rdsap.json | 209 ++++++++++++++++ .../SAP-Schema-14.0/to_hash_rdsap.json | 211 ++++++++++++++++ .../SAP-Schema-14.1/to_hash_rdsap.json | 211 ++++++++++++++++ .../SAP-Schema-14.2/to_hash_rdsap.json | 211 ++++++++++++++++ .../SAP-Schema-15.0/to_hash_rdsap.json | 223 +++++++++++++++++ .../SAP-Schema-16.0/to_hash_rdsap.json | 226 ++++++++++++++++++ .../SAP-Schema-16.1/to_hash_rdsap.json | 226 ++++++++++++++++++ .../SAP-Schema-16.2/to_hash_rdsap.json | 226 ++++++++++++++++++ .../SAP-Schema-16.3/to_hash_rdsap.json | 226 ++++++++++++++++++ spec/view_model/rdsap_wrapper_new_spec.rb | 19 +- 18 files changed, 3625 insertions(+), 1 deletion(-) create mode 100644 spec/fixtures/assertions/RdSAP-Schema-17.0/to_hash.json create mode 100644 spec/fixtures/assertions/RdSAP-Schema-17.1/to_hash.json create mode 100644 spec/fixtures/assertions/RdSAP-Schema-18.0/to_hash.json create mode 100644 spec/fixtures/assertions/RdSAP-Schema-19.0/to_hash.json create mode 100644 spec/fixtures/assertions/RdSAP-Schema-20.0.0/to_hash.json create mode 100644 spec/fixtures/assertions/SAP-Schema-11.0/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-11.2/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-12.0/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-13.0/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-14.0/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-14.1/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-14.2/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-15.0/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-16.0/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-16.1/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-16.2/to_hash_rdsap.json create mode 100644 spec/fixtures/assertions/SAP-Schema-16.3/to_hash_rdsap.json diff --git a/spec/fixtures/assertions/RdSAP-Schema-17.0/to_hash.json b/spec/fixtures/assertions/RdSAP-Schema-17.0/to_hash.json new file mode 100644 index 0000000..417d46e --- /dev/null +++ b/spec/fixtures/assertions/RdSAP-Schema-17.0/to_hash.json @@ -0,0 +1,200 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Testa Sessor", + "contact_details": { + "email": "a@b.c", + "telephone": "0555 497 2848" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "26", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "K", + "property_summary": [ + { + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1, + "name": "wall", + "description": "Solid brick, as built, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "wall", + "description": "Cavity wall, as built, insulated (assumed)" + }, + { + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2, + "name": "roof", + "description": "Pitched, 25 mm loft insulation" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "roof", + "description": "Pitched, 250 mm loft insulation" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Suspended, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Solid, insulated (assumed)" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3, + "name": "window", + "description": "Fully double glazed" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1, + "name": "main_heating", + "description": "Boiler and radiators, anthracite" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating", + "description": "Boiler and radiators, mains gas" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating_controls", + "description": "Programmer, room thermostat and TRVs" + }, + { + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5, + "name": "main_heating_controls", + "description": "Time and temperature zone control" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "hot_water", + "description": "From main system" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "lighting", + "description": "Low energy lighting in 50% of fixed outlets" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Room heaters, electric" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "6", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z3", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": "1", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "1000", + "sequence": 3, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": null, + "related_party_disclosure_text": "No related party", + "tenure": "1", + "transaction_type": "1", + "total_floor_area": 0.55e2, + "status": "ENTERED", + "country_code": "EAW", + "environmental_impact_current": 52, + "environmental_impact_potential": 74, + "addendum": null, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null +} \ No newline at end of file diff --git a/spec/fixtures/assertions/RdSAP-Schema-17.1/to_hash.json b/spec/fixtures/assertions/RdSAP-Schema-17.1/to_hash.json new file mode 100644 index 0000000..417d46e --- /dev/null +++ b/spec/fixtures/assertions/RdSAP-Schema-17.1/to_hash.json @@ -0,0 +1,200 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Testa Sessor", + "contact_details": { + "email": "a@b.c", + "telephone": "0555 497 2848" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "26", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "K", + "property_summary": [ + { + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1, + "name": "wall", + "description": "Solid brick, as built, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "wall", + "description": "Cavity wall, as built, insulated (assumed)" + }, + { + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2, + "name": "roof", + "description": "Pitched, 25 mm loft insulation" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "roof", + "description": "Pitched, 250 mm loft insulation" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Suspended, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Solid, insulated (assumed)" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3, + "name": "window", + "description": "Fully double glazed" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1, + "name": "main_heating", + "description": "Boiler and radiators, anthracite" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating", + "description": "Boiler and radiators, mains gas" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating_controls", + "description": "Programmer, room thermostat and TRVs" + }, + { + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5, + "name": "main_heating_controls", + "description": "Time and temperature zone control" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "hot_water", + "description": "From main system" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "lighting", + "description": "Low energy lighting in 50% of fixed outlets" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Room heaters, electric" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "6", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z3", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": "1", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "1000", + "sequence": 3, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": null, + "related_party_disclosure_text": "No related party", + "tenure": "1", + "transaction_type": "1", + "total_floor_area": 0.55e2, + "status": "ENTERED", + "country_code": "EAW", + "environmental_impact_current": 52, + "environmental_impact_potential": 74, + "addendum": null, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null +} \ No newline at end of file diff --git a/spec/fixtures/assertions/RdSAP-Schema-18.0/to_hash.json b/spec/fixtures/assertions/RdSAP-Schema-18.0/to_hash.json new file mode 100644 index 0000000..485e9b3 --- /dev/null +++ b/spec/fixtures/assertions/RdSAP-Schema-18.0/to_hash.json @@ -0,0 +1,203 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Testa Sessor", + "contact_details": { + "email": "a@b.c", + "telephone": "0555 497 2848" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "26", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "K", + "property_summary": [ + { + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1, + "name": "wall", + "description": "Solid brick, as built, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "wall", + "description": "Cavity wall, as built, insulated (assumed)" + }, + { + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2, + "name": "roof", + "description": "Pitched, 25 mm loft insulation" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "roof", + "description": "Pitched, 250 mm loft insulation" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Suspended, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Solid, insulated (assumed)" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3, + "name": "window", + "description": "Fully double glazed" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1, + "name": "main_heating", + "description": "Boiler and radiators, anthracite" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating", + "description": "Boiler and radiators, mains gas" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating_controls", + "description": "Programmer, room thermostat and TRVs" + }, + { + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5, + "name": "main_heating_controls", + "description": "Time and temperature zone control" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "hot_water", + "description": "From main system" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "lighting", + "description": "Low energy lighting in 50% of fixed outlets" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Room heaters, electric" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "6", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z3", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": "1", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "1000", + "sequence": 3, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": [11, 12], + "related_party_disclosure_number": null, + "related_party_disclosure_text": "No related party", + "tenure": "1", + "transaction_type": "1", + "total_floor_area": 0.55e2, + "status": "ENTERED", + "country_code": "EAW", + "environmental_impact_current": 52, + "environmental_impact_potential": 74, + "addendum": { + "stone_walls": true, + "system_build": true + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null +} \ No newline at end of file diff --git a/spec/fixtures/assertions/RdSAP-Schema-19.0/to_hash.json b/spec/fixtures/assertions/RdSAP-Schema-19.0/to_hash.json new file mode 100644 index 0000000..28f7cb3 --- /dev/null +++ b/spec/fixtures/assertions/RdSAP-Schema-19.0/to_hash.json @@ -0,0 +1,201 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Testa Sessor", + "contact_details": { + "email": "a@b.c", + "telephone": "0555 497 2848" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "26", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "K", + "property_summary": [ + { + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1, + "name": "wall", + "description": "Solid brick, as built, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "wall", + "description": "Cavity wall, as built, insulated (assumed)" + }, + { + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2, + "name": "roof", + "description": "Pitched, 25 mm loft insulation" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "roof", + "description": "Pitched, 250 mm loft insulation" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Suspended, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Solid, insulated (assumed)" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3, + "name": "window", + "description": "Fully double glazed" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1, + "name": "main_heating", + "description": "Boiler and radiators, anthracite" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating", + "description": "Boiler and radiators, mains gas" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating_controls", + "description": "Programmer, room thermostat and TRVs" + }, + { + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5, + "name": "main_heating_controls", + "description": "Time and temperature zone control" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "hot_water", + "description": "From main system" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "lighting", + "description": "Low energy lighting in 50% of fixed outlets" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Room heaters, electric" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "6", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z3", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": "1", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "1000", + "sequence": 3, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": [11], + "related_party_disclosure_number": null, + "related_party_disclosure_text": "No related party", + "tenure": "1", + "transaction_type": "1", + "total_floor_area": 0.55e2, + "status": "ENTERED", + "country_code": "EAW", + "environmental_impact_current": 52, + "environmental_impact_potential": 74, + "addendum": { + "addendum_number": [1]}, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null +} \ No newline at end of file diff --git a/spec/fixtures/assertions/RdSAP-Schema-20.0.0/to_hash.json b/spec/fixtures/assertions/RdSAP-Schema-20.0.0/to_hash.json new file mode 100644 index 0000000..9f7f129 --- /dev/null +++ b/spec/fixtures/assertions/RdSAP-Schema-20.0.0/to_hash.json @@ -0,0 +1,207 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "UPRN-000000000000", + "address_line1": "1 Some Street", + "address_line2": "", + "address_line3": "", + "address_line4": "", + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Testa Sessor", + "contact_details": { + "email": "a@b.c", + "telephone": "0555 497 2848" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "26", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "K", + "property_summary": [ + { + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1, + "name": "wall", + "description": "Solid brick, as built, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "wall", + "description": "Cavity wall, as built, insulated (assumed)" + }, + { + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2, + "name": "roof", + "description": "Pitched, 25 mm loft insulation" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "roof", + "description": "Pitched, 250 mm loft insulation" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Suspended, no insulation (assumed)" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Solid, insulated (assumed)" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3, + "name": "window", + "description": "Fully double glazed" + }, + { + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1, + "name": "main_heating", + "description": "Boiler and radiators, anthracite" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating", + "description": "Boiler and radiators, mains gas" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "main_heating_controls", + "description": "Programmer, room thermostat and TRVs" + }, + { + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5, + "name": "main_heating_controls", + "description": "Time and temperature zone control" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "hot_water", + "description": "From main system" + }, + { + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4, + "name": "lighting", + "description": "Low energy lighting in 50% of fixed outlets" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Room heaters, electric" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "6", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z3", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": "1", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "Z2", + "indicative_cost": "1000", + "sequence": 3, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": null, + "related_party_disclosure_text": "No related party", + "tenure": "1", + "transaction_type": "1", + "total_floor_area": 0.55e2, + "status": "ENTERED", + "country_code": "EAW", + "environmental_impact_current": 52, + "environmental_impact_potential": 74, + "addendum": { + "addendum_number": [ + 1, + 8 + ], + "stone_walls": true, + "system_build": true + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-11.0/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-11.0/to_hash_rdsap.json new file mode 100644 index 0000000..57819ed --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-11.0/to_hash_rdsap.json @@ -0,0 +1,209 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": null, + "estimated_energy_cost": "689.83", + "main_fuel_type": "10", + "heat_demand": { + "current_space_heating_demand": null, + "current_water_heating_demand": null, + "impact_of_cavity_insulation": null, + "impact_of_loft_insulation": null, + "impact_of_solid_wall_insulation": null + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": null, + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": null, + "improvement_category": "1", + "improvement_code": null, + "improvement_description": "", + "improvement_title": "", + "improvement_type": null, + "indicative_cost": null, + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": null, + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": null, + "indicative_cost": null, + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": null, + "related_party_disclosure_text": "Not related to owner", + "tenure": null, + "transaction_type": null, + "total_floor_area": 0.98e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": null, + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": 3, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": null, + "glazed_area": "1", + "habitable_room_count": 4, + "heated_room_count": 4, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": null, + "low_energy_fixed_lighting_outlets_count": null, + "open_fireplaces_count": 0, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": "0", + "wind_turbine_count": null, + "unheated_corridor_length": null, + "built_form": "Detached", + "mainheat_description": "Gas boiler", + "extensions_count": 0, + "addendum": null, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": null +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-11.2/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-11.2/to_hash_rdsap.json new file mode 100644 index 0000000..501ab60 --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-11.2/to_hash_rdsap.json @@ -0,0 +1,209 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": null, + "estimated_energy_cost": "689.83", + "main_fuel_type": "10", + "heat_demand": { + "current_space_heating_demand": null, + "current_water_heating_demand": null, + "impact_of_cavity_insulation": null, + "impact_of_loft_insulation": null, + "impact_of_solid_wall_insulation": null + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": null, + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": null, + "improvement_category": "1", + "improvement_code": null, + "improvement_description": "", + "improvement_title": "", + "improvement_type": null, + "indicative_cost": null, + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": null, + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": null, + "indicative_cost": null, + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": null, + "related_party_disclosure_text": "Not related to owner", + "tenure": null, + "transaction_type": null, + "total_floor_area": 0.98e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": null, + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": 3, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": null, + "glazed_area": "1", + "habitable_room_count": 4, + "heated_room_count": 4, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": null, + "low_energy_fixed_lighting_outlets_count": null, + "open_fireplaces_count": 0, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": "0", + "wind_turbine_count": null, + "unheated_corridor_length": null, + "built_form": "Detached", + "mainheat_description": "Gas boiler", + "extensions_count": 0, + "addendum": null, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-12.0/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-12.0/to_hash_rdsap.json new file mode 100644 index 0000000..3e9de95 --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-12.0/to_hash_rdsap.json @@ -0,0 +1,209 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": null, + "estimated_energy_cost": "689.83", + "main_fuel_type": "10", + "heat_demand": { + "current_space_heating_demand": null, + "current_water_heating_demand": null, + "impact_of_cavity_insulation": null, + "impact_of_loft_insulation": null, + "impact_of_solid_wall_insulation": null + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": null, + "improvement_category": "1", + "improvement_code": null, + "improvement_description": "", + "improvement_title": "", + "improvement_type": null, + "indicative_cost": null, + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": null, + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": null, + "indicative_cost": null, + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": null, + "related_party_disclosure_text": "Not related to owner", + "tenure": null, + "transaction_type": "5", + "total_floor_area": 0.98e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": 3, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "65", + "glazed_area": "1", + "habitable_room_count": 4, + "heated_room_count": 4, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": null, + "low_energy_fixed_lighting_outlets_count": null, + "open_fireplaces_count": 0, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": "0", + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "Detached", + "mainheat_description": "Gas boiler", + "extensions_count": 0, + "addendum": null, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-13.0/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-13.0/to_hash_rdsap.json new file mode 100644 index 0000000..e4958ef --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-13.0/to_hash_rdsap.json @@ -0,0 +1,209 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "10", + "heat_demand": { + "current_space_heating_demand": null, + "current_water_heating_demand": null, + "impact_of_cavity_insulation": null, + "impact_of_loft_insulation": null, + "impact_of_solid_wall_insulation": null + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": null, + "improvement_category": "1", + "improvement_code": null, + "improvement_description": "", + "improvement_title": "", + "improvement_type": null, + "indicative_cost": null, + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": null, + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": null, + "indicative_cost": null, + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": null, + "related_party_disclosure_text": "Not related to owner", + "tenure": null, + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": 3, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "65", + "glazed_area": "1", + "habitable_room_count": 4, + "heated_room_count": 4, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": null, + "low_energy_fixed_lighting_outlets_count": null, + "open_fireplaces_count": 0, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": "0", + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "Detached", + "mainheat_description": "Gas boiler", + "extensions_count": 0, + "addendum": null, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-14.0/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-14.0/to_hash_rdsap.json new file mode 100644 index 0000000..53e3d06 --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-14.0/to_hash_rdsap.json @@ -0,0 +1,211 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "10", + "heat_demand": { + "current_space_heating_demand": null, + "current_water_heating_demand": null, + "impact_of_cavity_insulation": null, + "impact_of_loft_insulation": null, + "impact_of_solid_wall_insulation": null + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": null, + "improvement_category": "1", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "A", + "indicative_cost": null, + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": null, + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "B", + "indicative_cost": null, + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": 1, + "related_party_disclosure_text": null, + "tenure": null, + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": 3, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "65", + "glazed_area": "1", + "habitable_room_count": 4, + "heated_room_count": 4, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": null, + "low_energy_fixed_lighting_outlets_count": null, + "open_fireplaces_count": 0, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": "0", + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "Detached", + "mainheat_description": "Gas boiler", + "extensions_count": 0, + "addendum": { + "addendum_number": [1] + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-14.1/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-14.1/to_hash_rdsap.json new file mode 100644 index 0000000..53e3d06 --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-14.1/to_hash_rdsap.json @@ -0,0 +1,211 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "10", + "heat_demand": { + "current_space_heating_demand": null, + "current_water_heating_demand": null, + "impact_of_cavity_insulation": null, + "impact_of_loft_insulation": null, + "impact_of_solid_wall_insulation": null + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": null, + "improvement_category": "1", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "A", + "indicative_cost": null, + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": null, + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "B", + "indicative_cost": null, + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": 1, + "related_party_disclosure_text": null, + "tenure": null, + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": 3, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "65", + "glazed_area": "1", + "habitable_room_count": 4, + "heated_room_count": 4, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": null, + "low_energy_fixed_lighting_outlets_count": null, + "open_fireplaces_count": 0, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": "0", + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "Detached", + "mainheat_description": "Gas boiler", + "extensions_count": 0, + "addendum": { + "addendum_number": [1] + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-14.2/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-14.2/to_hash_rdsap.json new file mode 100644 index 0000000..53e3d06 --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-14.2/to_hash_rdsap.json @@ -0,0 +1,211 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "10", + "heat_demand": { + "current_space_heating_demand": null, + "current_water_heating_demand": null, + "impact_of_cavity_insulation": null, + "impact_of_loft_insulation": null, + "impact_of_solid_wall_insulation": null + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": null, + "improvement_category": "1", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "A", + "indicative_cost": null, + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": null, + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "B", + "indicative_cost": null, + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": 1, + "related_party_disclosure_text": null, + "tenure": null, + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": 3, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "65", + "glazed_area": "1", + "habitable_room_count": 4, + "heated_room_count": 4, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": null, + "low_energy_fixed_lighting_outlets_count": null, + "open_fireplaces_count": 0, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": "0", + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "Detached", + "mainheat_description": "Gas boiler", + "extensions_count": 0, + "addendum": { + "addendum_number": [1] + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-15.0/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-15.0/to_hash_rdsap.json new file mode 100644 index 0000000..5c7c9fe --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-15.0/to_hash_rdsap.json @@ -0,0 +1,223 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "36", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": null, + "impact_of_loft_insulation": null, + "impact_of_solid_wall_insulation": null + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": null, + "improvement_category": "1", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "A", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": null, + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "B", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": 1, + "related_party_disclosure_text": null, + "tenure": null, + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": null, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "100", + "glazed_area": "1", + "habitable_room_count": 5, + "heated_room_count": 5, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": 11, + "low_energy_fixed_lighting_outlets_count": 9, + "open_fireplaces_count": 2, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": null, + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "End-Terrace", + "mainheat_description": "Gas boiler, Gas boiler", + "extensions_count": 1, + "addendum": { + "addendum_number": [1] + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-16.0/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-16.0/to_hash_rdsap.json new file mode 100644 index 0000000..98aacdd --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-16.0/to_hash_rdsap.json @@ -0,0 +1,226 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "36", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "1", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "A", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "B", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": 1, + "related_party_disclosure_text": null, + "tenure": null, + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": null, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "100", + "glazed_area": "1", + "habitable_room_count": 5, + "heated_room_count": 5, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": 11, + "low_energy_fixed_lighting_outlets_count": 9, + "open_fireplaces_count": 2, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": null, + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "End-Terrace", + "mainheat_description": "Gas boiler, Gas boiler", + "extensions_count": 1, + "addendum": { + "addendum_number": [ + 1 + ], + "stone_walls": true + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-16.1/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-16.1/to_hash_rdsap.json new file mode 100644 index 0000000..8f434d1 --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-16.1/to_hash_rdsap.json @@ -0,0 +1,226 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "36", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "1", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "A", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "B", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": 1, + "related_party_disclosure_text": null, + "tenure": "1", + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": null, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "100", + "glazed_area": "1", + "habitable_room_count": 5, + "heated_room_count": 5, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": 11, + "low_energy_fixed_lighting_outlets_count": 9, + "open_fireplaces_count": 2, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": null, + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "End-Terrace", + "mainheat_description": "Gas boiler, Gas boiler", + "extensions_count": 1, + "addendum": { + "addendum_number": [ + 1 + ], + "stone_walls": true + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-16.2/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-16.2/to_hash_rdsap.json new file mode 100644 index 0000000..8f434d1 --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-16.2/to_hash_rdsap.json @@ -0,0 +1,226 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "36", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "1", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "A", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "B", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": 1, + "related_party_disclosure_text": null, + "tenure": "1", + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": null, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "100", + "glazed_area": "1", + "habitable_room_count": 5, + "heated_room_count": 5, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": 11, + "low_energy_fixed_lighting_outlets_count": 9, + "open_fireplaces_count": 2, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": null, + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "End-Terrace", + "mainheat_description": "Gas boiler, Gas boiler", + "extensions_count": 1, + "addendum": { + "addendum_number": [ + 1 + ], + "stone_walls": true + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/fixtures/assertions/SAP-Schema-16.3/to_hash_rdsap.json b/spec/fixtures/assertions/SAP-Schema-16.3/to_hash_rdsap.json new file mode 100644 index 0000000..8f434d1 --- /dev/null +++ b/spec/fixtures/assertions/SAP-Schema-16.3/to_hash_rdsap.json @@ -0,0 +1,226 @@ +{ + "type_of_assessment": "RdSAP", + "assessment_id": "0000-0000-0000-0000-0000", + "date_of_expiry": "2030-05-03", + "date_of_assessment": "2020-05-04", + "date_of_registration": "2020-05-04", + "date_registered": "2020-05-04", + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA", + "address": { + "address_id": "LPRN-0000000000", + "address_line1": "1 Some Street", + "address_line2": "Some Area", + "address_line3": "Some County", + "address_line4": null, + "town": "Whitbury", + "postcode": "A0 0AA" + }, + "assessor": { + "scheme_assessor_id": "SPEC000000", + "name": "Mr Test Boi TST", + "contact_details": { + "email": "a@b.c", + "telephone": "111222333" + } + }, + "current_carbon_emission": 0.24e1, + "current_energy_efficiency_band": "e", + "current_energy_efficiency_rating": 50, + "dwelling_type": "Mid-terrace house", + "estimated_energy_cost": "689.83", + "main_fuel_type": "36", + "heat_demand": { + "current_space_heating_demand": 13120, + "current_water_heating_demand": 2285, + "impact_of_cavity_insulation": -122, + "impact_of_loft_insulation": -2114, + "impact_of_solid_wall_insulation": -3560 + }, + "heating_cost_current": "365.98", + "heating_cost_potential": "250.34", + "hot_water_cost_current": "200.40", + "hot_water_cost_potential": "180.43", + "lighting_cost_current": "123.45", + "lighting_cost_potential": "84.23", + "potential_carbon_emission": 0.14e1, + "potential_energy_efficiency_band": "c", + "potential_energy_efficiency_rating": 72, + "potential_energy_saving": "174.83", + "primary_energy_use": "230", + "energy_consumption_potential": "88", + "property_age_band": "A", + "property_summary": [ + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "wall", + "description": "Brick walls" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "Slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "roof", + "description": "slate roof" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "floor", + "description": "Tiled floor" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "window", + "description": "Glass window" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "main_heating_controls", + "description": "Thermostat" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "hot_water", + "description": "Gas boiler" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "lighting", + "description": "Energy saving bulbs" + }, + { + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0, + "name": "secondary_heating", + "description": "Electric heater" + } + ], + "recommended_improvements": [ + { + "energy_performance_rating_improvement": 50, + "environmental_impact_rating_improvement": 50, + "green_deal_category_code": "1", + "improvement_category": "1", + "improvement_code": "5", + "improvement_description": null, + "improvement_title": "", + "improvement_type": "A", + "indicative_cost": "£100 - £350", + "sequence": 1, + "typical_saving": "360", + "energy_performance_band_improvement": "e" + }, + { + "energy_performance_rating_improvement": 60, + "environmental_impact_rating_improvement": 64, + "green_deal_category_code": "3", + "improvement_category": "2", + "improvement_code": null, + "improvement_description": "Improvement desc", + "improvement_title": "", + "improvement_type": "B", + "indicative_cost": "2000", + "sequence": 2, + "typical_saving": "99", + "energy_performance_band_improvement": "d" + } + ], + "lzc_energy_sources": null, + "related_party_disclosure_number": 1, + "related_party_disclosure_text": null, + "tenure": "1", + "transaction_type": "5", + "total_floor_area": 0.69e2, + "total_roof_area": null, + "status": "ENTERED", + "environmental_impact_current": 52, + "environmental_impact_potential": 70, + "co2_emissions_current_per_floor_area": "56", + "mains_gas": null, + "level": null, + "top_storey": "N", + "storey_count": null, + "main_heating_controls": "Thermostat", + "multiple_glazed_proportion": "100", + "glazed_area": "1", + "habitable_room_count": 5, + "heated_room_count": 5, + "low_energy_lighting": null, + "fixed_lighting_outlets_count": 11, + "low_energy_fixed_lighting_outlets_count": 9, + "open_fireplaces_count": 2, + "hot_water_description": "Gas boiler", + "hot_water_energy_efficiency_rating": "0", + "hot_water_environmental_efficiency_rating": "0", + "window_description": "Glass window", + "window_energy_efficiency_rating": "0", + "window_environmental_efficiency_rating": "0", + "secondary_heating_description": "Electric heater", + "secondary_heating_energy_efficiency_rating": "0", + "secondary_heating_environmental_efficiency_rating": "0", + "lighting_description": "Energy saving bulbs", + "lighting_energy_efficiency_rating": "0", + "lighting_environmental_efficiency_rating": "0", + "photovoltaic_roof_area_percent": "0", + "heat_loss_corridor": null, + "wind_turbine_count": 0, + "unheated_corridor_length": null, + "built_form": "End-Terrace", + "mainheat_description": "Gas boiler, Gas boiler", + "extensions_count": 1, + "addendum": { + "addendum_number": [ + 1 + ], + "stone_walls": true + }, + "gas_smart_meter_present": null, + "electricity_smart_meter_present": null, + "country_code": "EAW" +} \ No newline at end of file diff --git a/spec/view_model/rdsap_wrapper_new_spec.rb b/spec/view_model/rdsap_wrapper_new_spec.rb index 210507e..e259565 100644 --- a/spec/view_model/rdsap_wrapper_new_spec.rb +++ b/spec/view_model/rdsap_wrapper_new_spec.rb @@ -4,7 +4,24 @@ context "when calling the RdSAP wrapper for a valid schema" do it "returns the expected assertion" do schema_tests = [ - { schema: "RdSAP-Schema-21.0.0", type: "epc", method_called: :to_hash } + { schema: "RdSAP-Schema-21.0.0", type: "epc", method_called: :to_hash }, + { schema: "RdSAP-Schema-20.0.0", type: "epc", method_called: :to_hash }, + { schema: "RdSAP-Schema-19.0", type: "epc", method_called: :to_hash }, + { schema: "RdSAP-Schema-18.0", type: "epc", method_called: :to_hash }, + { schema: "RdSAP-Schema-17.1", type: "epc", method_called: :to_hash }, + { schema: "RdSAP-Schema-17.0", type: "epc", method_called: :to_hash }, + { schema: "SAP-Schema-16.3", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-16.2", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-16.1", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-16.0", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-15.0", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-14.2", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-14.1", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-14.0", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-13.0", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-12.0", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-11.2", type: "rdsap", method_called: :to_hash }, + { schema: "SAP-Schema-11.0", type: "rdsap", method_called: :to_hash }, ] schema_tests.each do |schema|