Skip to content

Commit 61fc0fd

Browse files
authored
Merge pull request #1262 from ie3-institute/df/#1260-Remove-double-test-in-ThermalValidationUtils
Remove double test in ThermalValidationUtils
2 parents 80d4660 + f7c428c commit 61fc0fd

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
### Fixed
2323
- Removing opened `SwitchInput` during connectivity check [#1221](https://github.com/ie3-institute/PowerSystemDataModel/issues/1221)
2424
- Fixed example in ReadTheDocs [#1244](https://github.com/ie3-institute/PowerSystemDataModel/issues/1244)
25+
- Remove double test in ThermalValidationUtils [#1260](https://github.com/ie3-institute/PowerSystemDataModel/issues/1260)]
2526

2627
### Changed
2728
- Storage minimum level parameter removed from cylindrical thermal storage [#1123](https://github.com/ie3-institute/PowerSystemDataModel/issues/1123)

src/test/groovy/edu/ie3/datamodel/utils/validation/ThermalValidationUtilsTest.groovy

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -167,32 +167,4 @@ class ThermalValidationUtilsTest extends Specification {
167167
thermalHouse || expectedSize || expectedException
168168
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)
169169
}
170-
171-
def "ThermalValidationUtils.check() works for complete ThermalGrid as well"() {
172-
when:
173-
def thermalBus = ThermalUnitInputTestData.thermalBus
174-
def cylindricalStorageInput = [
175-
ThermalUnitInputTestData.cylindricalStorageInput
176-
]
177-
def domesticHotWaterStorageInput = [
178-
ThermalUnitInputTestData.domesticHotWaterStorageInput
179-
]
180-
181-
182-
ThermalGrid thermalGrid = new ThermalGrid(thermalBus, [thermalHouse], cylindricalStorageInput, domesticHotWaterStorageInput)
183-
184-
185-
List<Try<Void, ? extends ValidationException>> exceptions = ThermalValidationUtils.check(thermalGrid).stream().filter { it -> it.failure }.toList()
186-
187-
then:
188-
exceptions.size() == expectedSize
189-
Exception ex = exceptions.get(0).exception.get()
190-
ex.class == expectedException.class
191-
ex.message == expectedException.message
192-
193-
194-
where:
195-
thermalHouse || expectedSize || expectedException
196-
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)
197-
}
198170
}

0 commit comments

Comments
 (0)