Skip to content

Commit

Permalink
EPBR-8023 Missed the SAP 10.2 schema from the refactor
Browse files Browse the repository at this point in the history
Add the test and assertion for sap 10.2 (which is rdsap only)
  • Loading branch information
Christine-horrocks committed Jan 8, 2025
1 parent 90609c8 commit 58d42c1
Show file tree
Hide file tree
Showing 2 changed files with 210 additions and 0 deletions.
209 changes: 209 additions & 0 deletions spec/fixtures/assertions/SAP-Schema-10.2/to_hash_rdsap.json
Original file line number Diff line number Diff line change
@@ -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": null,
"window_energy_efficiency_rating": null,
"window_environmental_efficiency_rating": null,
"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
}
1 change: 1 addition & 0 deletions spec/view_model/rdsap_wrapper_new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
{ 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: "SAP-Schema-10.2", type: "rdsap", method_called: :to_hash },
{ schema: "RdSAP-Schema-NI-20.0.0", type: "epc", method_called: :to_hash },
{ schema: "RdSAP-Schema-NI-19.0", type: "epc", method_called: :to_hash },
{ schema: "RdSAP-Schema-NI-18.0", type: "epc", method_called: :to_hash },
Expand Down

0 comments on commit 58d42c1

Please sign in to comment.