def test_material_wrong():
    file_path = os.path.join(target_folder, 'material_opaque_gypsum.json')
    with open(file_path) as json_file:
        material_gypsum = json.load(json_file)
    wrong_name = copy(material_gypsum)
    wrong_name['name'] = ''
    with pytest.raises(ValidationError):
        EnergyMaterial.parse_obj(wrong_name)
    wrong_thickness = copy(material_gypsum)
    wrong_thickness['thickness'] = 5
    with pytest.raises(ValidationError):
        EnergyMaterial.parse_obj(wrong_thickness)
    wrong_specificheat = copy(material_gypsum)
    wrong_specificheat['specific_heat'] = 0
    with pytest.raises(ValidationError):
        EnergyMaterial.parse_obj(wrong_specificheat)
def test_material_opaque_brick():
    file_path = os.path.join(target_folder, 'material_opaque_brick.json')
    EnergyMaterial.parse_file(file_path)
def test_material_opaque_insulation():
    file_path = os.path.join(target_folder, 'material_opaque_insulation.json')
    EnergyMaterial.parse_file(file_path)