diff --git a/CHANGELOG.md b/CHANGELOG.md index 642923271..7f16f37a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Removing opened `SwitchInput` during connectivity check [#1221](https://github.com/ie3-institute/PowerSystemDataModel/issues/1221) - Fixed example in ReadTheDocs [#1244](https://github.com/ie3-institute/PowerSystemDataModel/issues/1244) +- Remove double test in ThermalValidationUtils [#1260](https://github.com/ie3-institute/PowerSystemDataModel/issues/1260)] ### Changed - Storage minimum level parameter removed from cylindrical thermal storage [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1123) diff --git a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalValidationUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalValidationUtilsTest.groovy index 76ccec889..7f30e8812 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalValidationUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalValidationUtilsTest.groovy @@ -167,32 +167,4 @@ class ThermalValidationUtilsTest extends Specification { thermalHouse || expectedSize || expectedException new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT, HOUSING_TYPE, NUMBER_INHABITANTS) || 1 || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", thermalHouse) } - - def "ThermalValidationUtils.check() works for complete ThermalGrid as well"() { - when: - def thermalBus = ThermalUnitInputTestData.thermalBus - def cylindricalStorageInput = [ - ThermalUnitInputTestData.cylindricalStorageInput - ] - def domesticHotWaterStorageInput = [ - ThermalUnitInputTestData.domesticHotWaterStorageInput - ] - - - ThermalGrid thermalGrid = new ThermalGrid(thermalBus, [thermalHouse], cylindricalStorageInput, domesticHotWaterStorageInput) - - - List> exceptions = ThermalValidationUtils.check(thermalGrid).stream().filter { it -> it.failure }.toList() - - then: - exceptions.size() == expectedSize - Exception ex = exceptions.get(0).exception.get() - ex.class == expectedException.class - ex.message == expectedException.message - - - where: - thermalHouse || expectedSize || expectedException - new ThermalHouseInput(thermalUnitUuid, id, operator, operationTime, SystemParticipantTestData.thermalBus, thermalConductance, ethCapa, Quantities.getQuantity(0, StandardUnits.TEMPERATURE), UPPER_TEMPERATURE_LIMIT, LOWER_TEMPERATURE_LIMIT, "house", 2) || 1 || new InvalidEntityException("Target temperature must be higher than lower temperature limit and lower than upper temperature limit", thermalHouse) - } }