From 0c391530383baf4fef272091e2dfd826aa06af2f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 04:08:13 +0000 Subject: [PATCH 1/2] Bump org.apache.groovy:groovy from 4.0.28 to 5.0.3 Bumps [org.apache.groovy:groovy](https://github.com/apache/groovy) from 4.0.28 to 5.0.3. - [Commits](https://github.com/apache/groovy/commits) --- updated-dependencies: - dependency-name: org.apache.groovy:groovy dependency-version: 5.0.3 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 4c4fd7bed..7bd661016 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ ext { //version (changing these should be considered thoroughly!) javaVersion = JavaVersion.VERSION_21 groovyVersion = "4.0" - groovyBinaryVersion = "4.0.28" + groovyBinaryVersion = "5.0.3" junitVersion = '6.0.1' testcontainersVersion = '2.0.3' From b2ab382502b45baf46785defdd19556ac3f3a0d9 Mon Sep 17 00:00:00 2001 From: staudtMarius Date: Tue, 16 Dec 2025 08:16:01 +0100 Subject: [PATCH 2/2] Updating spock-core to 2.4-groovy-5.0 --- build.gradle | 3 +- .../TimeBasedSimpleValueFactory.java | 1 - .../io/connectors/SqlConnectorIT.groovy | 6 +- .../io/csv/BufferedCsvWriterTest.groovy | 4 +- .../io/csv/CsvFileDefinitionTest.groovy | 40 ++--- .../LineGraphicInputFactoryTest.groovy | 10 +- .../NodeGraphicInputFactoryTest.groovy | 12 +- .../input/AssetInputEntityFactoryTest.groovy | 100 ++++++------ .../CylindricalStorageInputFactoryTest.groovy | 20 +-- ...sticHotWaterStorageInputFactoryTest.groovy | 20 +-- .../factory/input/EmInputFactoryTest.groovy | 36 ++--- .../factory/input/LineInputFactoryTest.groovy | 58 +++---- .../MeasurementUnitInputFactoryTest.groovy | 18 +-- .../factory/input/NodeInputFactoryTest.groovy | 22 +-- .../input/OperatorInputFactoryTest.groovy | 4 +- .../input/SwitchInputFactoryTest.groovy | 38 ++--- .../input/ThermalBusInputFactoryTest.groovy | 12 +- .../input/ThermalHouseInputFactoryTest.groovy | 24 +-- .../Transformer2WInputFactoryTest.groovy | 24 +-- .../Transformer3WInputFactoryTest.groovy | 22 +-- .../participant/BmInputFactoryTest.groovy | 32 ++-- .../participant/ChpInputFactoryTest.groovy | 28 ++-- .../participant/EvInputFactoryTest.groovy | 26 +-- .../participant/EvcsInputFactoryTest.groovy | 34 ++-- .../FixedFeedInInputFactoryTest.groovy | 26 +-- .../participant/HpInputFactoryTest.groovy | 28 ++-- .../participant/LoadInputFactoryTest.groovy | 26 +-- .../participant/PvInputFactoryTest.groovy | 42 ++--- .../StorageInputFactoryTest.groovy | 26 +-- .../participant/WecInputFactoryTest.groovy | 26 +-- .../result/ConnectorResultFactoryTest.groovy | 20 +-- .../FlexOptionsResultFactoryTest.groovy | 10 +- .../result/NodeResultFactoryTest.groovy | 8 +- .../result/SwitchResultFactoryTest.groovy | 6 +- .../SystemParticipantResultFactoryTest.groovy | 22 +-- .../result/ThermalResultFactoryTest.groovy | 28 ++-- .../CosmoIdCoordinateFactoryTest.groovy | 4 +- .../IconIdCoordinateFactoryTest.groovy | 4 +- ...conTimeBasedWeatherValueFactoryTest.groovy | 24 +-- .../TimeBasedSimpleValueFactoryTest.groovy | 8 +- .../typeinput/LineTypeInputFactoryTest.groovy | 16 +- ...stemParticipantTypeInputFactoryTest.groovy | 120 +++++++------- .../Transformer2WTypeInputFactoryTest.groovy | 30 ++-- .../Transformer3WTypeInputFactoryTest.groovy | 42 ++--- .../io/naming/FileNamingStrategyTest.groovy | 16 +- .../timeseries/TimeSeriesProcessorTest.groovy | 12 +- .../io/source/AssetEntitySourceTest.groovy | 6 +- .../io/source/ThermalSourceTest.groovy | 4 +- .../io/source/csv/CsvRawGridSourceTest.groovy | 150 +++++++++--------- .../csv/CsvThermalGridSourceTest.groovy | 6 +- .../input/MeasurementUnitInputTest.groovy | 18 +-- .../models/input/NodeInputTest.groovy | 16 +- .../models/input/OperatorInputTest.groovy | 4 +- .../input/connector/LineInputTest.groovy | 14 +- .../input/connector/SwitchInputTest.groovy | 10 +- .../connector/Transformer2WInputTest.groovy | 18 +-- .../connector/Transformer3WInputTest.groovy | 20 +-- .../graphics/LineGraphicInputTest.groovy | 8 +- .../graphics/NodeGraphicInputTest.groovy | 8 +- .../models/input/system/BmInputTest.groovy | 42 ++--- .../models/input/system/ChpInputTest.groovy | 46 +++--- .../models/input/system/EmInputTest.groovy | 18 +-- .../models/input/system/EvInputTest.groovy | 36 ++--- .../models/input/system/EvcsInputTest.groovy | 46 +++--- .../input/system/FixedFeedInInputTest.groovy | 32 ++-- .../models/input/system/HpInputTest.groovy | 36 ++--- .../models/input/system/LoadInputTest.groovy | 44 ++--- .../models/input/system/PvInputTest.groovy | 60 +++---- .../input/system/StorageInputTest.groovy | 34 ++-- .../models/input/system/WecInputTest.groovy | 38 ++--- .../input/system/type/BmTypeInputTest.groovy | 28 ++-- .../input/system/type/ChpTypeInputTest.groovy | 40 ++--- .../input/system/type/EvTypeInputTest.groovy | 36 ++--- .../input/system/type/HpTypeInputTest.groovy | 28 ++-- .../system/type/StorageTypeInputTest.groovy | 41 +++-- .../input/system/type/WecTypeInputTest.groovy | 40 ++--- .../ChargingPointTypeTest.groovy | 16 +- .../CylindricalStorageInputTest.groovy | 38 ++--- .../DomesticHotWaterStorageInputTest.groovy | 38 ++--- .../input/thermal/ThermalBusInputTest.groovy | 8 +- .../thermal/ThermalHouseInputTest.groovy | 56 +++---- .../models/typeInput/LineTypeInputTest.groovy | 16 +- .../Transformer2WTypeInputTest.groovy | 30 ++-- .../Transformer3WTypeInputTest.groovy | 42 ++--- .../utils/ContainerNodeUpdateUtilTest.groovy | 36 ++--- .../datamodel/utils/ContainerUtilsTest.groovy | 44 ++--- .../ie3/datamodel/utils/FileUtilsTest.groovy | 10 +- .../edu/ie3/datamodel/utils/TryTest.groovy | 12 +- 88 files changed, 1203 insertions(+), 1208 deletions(-) diff --git a/build.gradle b/build.gradle index 7bd661016..6e321991c 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,6 @@ plugins { ext { //version (changing these should be considered thoroughly!) javaVersion = JavaVersion.VERSION_21 - groovyVersion = "4.0" groovyBinaryVersion = "5.0.3" junitVersion = '6.0.1' @@ -80,7 +79,7 @@ dependencies { testImplementation "org.junit.platform:junit-platform-launcher:$junitVersion" testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion" - testImplementation "org.spockframework:spock-core:2.3-groovy-$groovyVersion" + testImplementation "org.spockframework:spock-core:2.4-groovy-5.0" testImplementation 'org.objenesis:objenesis:3.4' // Mock creation with constructor parameters testImplementation 'net.bytebuddy:byte-buddy:1.18.2' // Mocks of classes diff --git a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java index 52b39e2d7..a209eea8f 100644 --- a/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java +++ b/src/main/java/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactory.java @@ -17,7 +17,6 @@ public class TimeBasedSimpleValueFactory extends TimeBasedValueFactory, V> { - private static final String TIME = "time"; /* Energy price */ private static final String PRICE = "price"; /* Energy / Power */ diff --git a/src/test/groovy/edu/ie3/datamodel/io/connectors/SqlConnectorIT.groovy b/src/test/groovy/edu/ie3/datamodel/io/connectors/SqlConnectorIT.groovy index 047d26987..37d933d81 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/connectors/SqlConnectorIT.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/connectors/SqlConnectorIT.groovy @@ -39,9 +39,9 @@ class SqlConnectorIT extends Specification implements TestContainerHelper { def "A SQL connector is instantiated correctly"() { expect: connector.with { - assert it.jdbcUrl == postgreSQLContainer.jdbcUrl - assert it.connectionProps.getProperty("user") == postgreSQLContainer.username - assert it.connectionProps.getProperty("password") == postgreSQLContainer.password + it.jdbcUrl == postgreSQLContainer.jdbcUrl + it.connectionProps.getProperty("user") == postgreSQLContainer.username + it.connectionProps.getProperty("password") == postgreSQLContainer.password /* SQL connection should be null, but we cannot test it here, as it would fire the default getter, which * initializes a connection, if it is not yet initialized. */ } diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/BufferedCsvWriterTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/BufferedCsvWriterTest.groovy index a5d799849..3ca62921d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/BufferedCsvWriterTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/csv/BufferedCsvWriterTest.groovy @@ -40,8 +40,8 @@ class BufferedCsvWriterTest extends Specification { then: actual.with { - assert it.headLineElements == ["a", "b", "c"] as String[] - assert it.csvSep == "," + it.headLineElements == ["a", "b", "c"] as String[] + it.csvSep == "," } expectedFile.exists() expectedFile.file // is it a file? diff --git a/src/test/groovy/edu/ie3/datamodel/io/csv/CsvFileDefinitionTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/csv/CsvFileDefinitionTest.groovy index 682c7975e..1b9cbe40a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/csv/CsvFileDefinitionTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/csv/CsvFileDefinitionTest.groovy @@ -65,10 +65,10 @@ class CsvFileDefinitionTest extends Specification { then: actual.with { - assert it.filePath.fileName == Path.of(this.fileName) - assert it.directoryPath == this.directory - assert it.headLineElements() == this.headLineElements - assert it.csvSep() == this.csvSep + it.filePath.fileName == Path.of(this.fileName) + it.directoryPath == this.directory + it.headLineElements() == this.headLineElements + it.csvSep() == this.csvSep } } @@ -81,10 +81,10 @@ class CsvFileDefinitionTest extends Specification { then: actual.with { - assert it.filePath.fileName == Path.of(this.fileName) - assert it.directoryPath == this.directory - assert it.headLineElements() == this.headLineElements - assert it.csvSep() == this.csvSep + it.filePath.fileName == Path.of(this.fileName) + it.directoryPath == this.directory + it.headLineElements() == this.headLineElements + it.csvSep() == this.csvSep } } @@ -98,9 +98,9 @@ class CsvFileDefinitionTest extends Specification { then: actual.with { - assert it.filePath == expected.filePath - assert it.headLineElements() == expected.headLineElements() - assert it.csvSep() == expected.csvSep() + it.filePath == expected.filePath + it.headLineElements() == expected.headLineElements() + it.csvSep() == expected.csvSep() } } @@ -115,9 +115,9 @@ class CsvFileDefinitionTest extends Specification { then: actual.with { - assert it.filePath == expected.filePath - assert it.headLineElements() == expected.headLineElements() - assert it.csvSep() == expected.csvSep() + it.filePath == expected.filePath + it.headLineElements() == expected.headLineElements() + it.csvSep() == expected.csvSep() } } @@ -154,9 +154,9 @@ class CsvFileDefinitionTest extends Specification { then: actual.with { - assert it.filePath == expected.filePath - assert it.headLineElements() == expected.headLineElements() - assert it.csvSep() == expected.csvSep() + it.filePath == expected.filePath + it.headLineElements() == expected.headLineElements() + it.csvSep() == expected.csvSep() } } @@ -179,9 +179,9 @@ class CsvFileDefinitionTest extends Specification { then: actual.with { - assert it.filePath == expected.filePath - assert it.headLineElements() == expected.headLineElements() - assert it.csvSep() == expected.csvSep() + it.filePath == expected.filePath + it.headLineElements() == expected.headLineElements() + it.csvSep() == expected.csvSep() } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/graphics/LineGraphicInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/graphics/LineGraphicInputFactoryTest.groovy index 047237f7b..c1d1e0fbe 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/graphics/LineGraphicInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/graphics/LineGraphicInputFactoryTest.groovy @@ -47,10 +47,10 @@ class LineGraphicInputFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert path == getGeometry(parameter["path"]) - assert graphicLayer == parameter["graphiclayer"] - assert line == lineInput + uuid == UUID.fromString(parameter["uuid"]) + path == getGeometry(parameter["path"]) + graphicLayer == parameter["graphiclayer"] + line == lineInput } } def "A LineGraphicInputFactory should parse a valid LineGraphicInput with different geoPosition strings correctly"() { @@ -73,7 +73,7 @@ class LineGraphicInputFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert path == GridAndGeoUtils.buildSafeLineString(getGeometry(parameter["path"]) as LineString) + path == GridAndGeoUtils.buildSafeLineString(getGeometry(parameter["path"]) as LineString) } where: diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/graphics/NodeGraphicInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/graphics/NodeGraphicInputFactoryTest.groovy index b6aac3179..fbbd6fb65 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/graphics/NodeGraphicInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/graphics/NodeGraphicInputFactoryTest.groovy @@ -48,11 +48,11 @@ class NodeGraphicInputFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert point == getGeometry(parameter["point"]) - assert path == getGeometry(parameter["path"]) - assert graphicLayer == parameter["graphiclayer"] - assert node == nodeInput + uuid == UUID.fromString(parameter["uuid"]) + point == getGeometry(parameter["point"]) + path == getGeometry(parameter["path"]) + graphicLayer == parameter["graphiclayer"] + node == nodeInput } } @@ -77,7 +77,7 @@ class NodeGraphicInputFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert path == GridAndGeoUtils.buildSafeLineString(getGeometry(parameter["path"]) as LineString) + path == GridAndGeoUtils.buildSafeLineString(getGeometry(parameter["path"]) as LineString) } where: geoLineString | _ diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy index a468dfc4e..c97c95afa 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/AssetInputEntityFactoryTest.groovy @@ -47,10 +47,10 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == operatorInput - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == operatorInput + id == parameter["id"] } } @@ -73,10 +73,10 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == operatorInput - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == operatorInput + id == parameter["id"] } where: @@ -106,12 +106,12 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] } } @@ -133,12 +133,12 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert !operationTime.startDate.present - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + !operationTime.startDate.present + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] } } @@ -161,13 +161,13 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] } } @@ -187,10 +187,10 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] } } @@ -211,12 +211,12 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] } } @@ -237,12 +237,12 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert !operationTime.startDate.present - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + !operationTime.startDate.present + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] } } @@ -264,13 +264,13 @@ class AssetInputEntityFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy index e8d7f8989..68242d9c5 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/CylindricalStorageInputFactoryTest.groovy @@ -47,16 +47,16 @@ class CylindricalStorageInputFactoryTest extends Specification implements Facto input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] - assert thermalBus == thermalBusInput - assert storageVolumeLvl == getQuant(parameter["storagevolumelvl"], StandardUnits.VOLUME) - assert inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE) - assert returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE) - assert c == getQuant(parameter["c"], StandardUnits.SPECIFIC_HEAT_CAPACITY) - assert pThermalMax == getQuant(parameter["pThermalMax"], StandardUnits.ACTIVE_POWER_IN) + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] + thermalBus == thermalBusInput + storageVolumeLvl == getQuant(parameter["storagevolumelvl"], StandardUnits.VOLUME) + inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE) + returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE) + c == getQuant(parameter["c"], StandardUnits.SPECIFIC_HEAT_CAPACITY) + pThermalMax == getQuant(parameter["pThermalMax"], StandardUnits.ACTIVE_POWER_IN) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/DomesticHotWaterStorageInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/DomesticHotWaterStorageInputFactoryTest.groovy index 38849415d..179adc145 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/DomesticHotWaterStorageInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/DomesticHotWaterStorageInputFactoryTest.groovy @@ -47,16 +47,16 @@ class DomesticHotWaterStorageInputFactoryTest extends Specification implements F input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] - assert thermalBus == thermalBusInput - assert storageVolumeLvl == getQuant(parameter["storagevolumelvl"], StandardUnits.VOLUME) - assert inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE) - assert returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE) - assert c == getQuant(parameter["c"], StandardUnits.SPECIFIC_HEAT_CAPACITY) - assert pThermalMax == getQuant(parameter["pThermalMax"], StandardUnits.ACTIVE_POWER_IN) + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] + thermalBus == thermalBusInput + storageVolumeLvl == getQuant(parameter["storagevolumelvl"], StandardUnits.VOLUME) + inletTemp == getQuant(parameter["inlettemp"], StandardUnits.TEMPERATURE) + returnTemp == getQuant(parameter["returntemp"], StandardUnits.TEMPERATURE) + c == getQuant(parameter["c"], StandardUnits.SPECIFIC_HEAT_CAPACITY) + pThermalMax == getQuant(parameter["pThermalMax"], StandardUnits.ACTIVE_POWER_IN) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/EmInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/EmInputFactoryTest.groovy index 5cc32ca9d..a2471b638 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/EmInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/EmInputFactoryTest.groovy @@ -120,15 +120,15 @@ class EmInputFactoryTest extends Specification { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert controlStrategy == parameter["controlstrategy"] - assert controllingEm == Optional.of(parentEmUnit) + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + controlStrategy == parameter["controlstrategy"] + controllingEm == Optional.of(parentEmUnit) } } @@ -153,15 +153,15 @@ class EmInputFactoryTest extends Specification { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert controlStrategy == parameter["controlstrategy"] - assert controllingEm == Optional.empty() + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + controlStrategy == parameter["controlstrategy"] + controllingEm == Optional.empty() } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/LineInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/LineInputFactoryTest.groovy index 8a0ed78b6..142361e05 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/LineInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/LineInputFactoryTest.groovy @@ -64,21 +64,21 @@ class LineInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] - assert nodeA == nodeInputA - assert nodeB == nodeInputB - assert type == typeInput - assert parallelDevices == Integer.parseInt(parameter["paralleldevices"]) - assert length == getQuant(parameter["length"], StandardUnits.LINE_LENGTH) - assert geoPosition == getGeometry(parameter["geoposition"]) + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] + nodeA == nodeInputA + nodeB == nodeInputB + type == typeInput + parallelDevices == Integer.parseInt(parameter["paralleldevices"]) + length == getQuant(parameter["length"], StandardUnits.LINE_LENGTH) + geoPosition == getGeometry(parameter["geoposition"]) olmCharacteristic.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint( Quantities.getQuantity(0d, METRE_PER_SECOND), Quantities.getQuantity(1d, PU)) @@ -115,21 +115,21 @@ class LineInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] - assert nodeA == nodeInputA - assert nodeB == nodeInputB - assert type == typeInput - assert parallelDevices == Integer.parseInt(parameter["paralleldevices"]) - assert length == getQuant(parameter["length"], StandardUnits.LINE_LENGTH) - assert geoPosition == getGeometry(parameter["geoposition"]) + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] + nodeA == nodeInputA + nodeB == nodeInputB + type == typeInput + parallelDevices == Integer.parseInt(parameter["paralleldevices"]) + length == getQuant(parameter["length"], StandardUnits.LINE_LENGTH) + geoPosition == getGeometry(parameter["geoposition"]) olmCharacteristic.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint( Quantities.getQuantity(0d, METRE_PER_SECOND), Quantities.getQuantity(1d, PU)) @@ -166,7 +166,7 @@ class LineInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert geoPosition == GridAndGeoUtils.buildSafeLineString(getGeometry(parameter["geoposition"]) as LineString) + geoPosition == GridAndGeoUtils.buildSafeLineString(getGeometry(parameter["geoposition"]) as LineString) } where: diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/MeasurementUnitInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/MeasurementUnitInputFactoryTest.groovy index d1c669d2c..9edab1e9d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/MeasurementUnitInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/MeasurementUnitInputFactoryTest.groovy @@ -45,15 +45,15 @@ class MeasurementUnitInputFactoryTest extends Specification implements FactoryTe input.success input.data.get().getClass() == inputClass ((MeasurementUnitInput) input.data.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] - assert node == nodeInput - assert VMag - assert !VAng - assert p - assert q + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] + node == nodeInput + VMag + !VAng + p + q } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/NodeInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/NodeInputFactoryTest.groovy index 8fba840d1..bfc3c5408 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/NodeInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/NodeInputFactoryTest.groovy @@ -53,17 +53,17 @@ class NodeInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass ((NodeInput) input.data.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] - assert vTarget == getQuant(parameter["vtarget"], StandardUnits.TARGET_VOLTAGE_MAGNITUDE) - assert slack - assert geoPosition == getGeometry(parameter["geoposition"]) - assert voltLvl == GermanVoltageLevelUtils.parse(parameter["voltlvl"], getQuant(parameter["vrated"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) as ComparableQuantity) - assert subnet == Integer.parseInt(parameter["subnet"]) + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] + vTarget == getQuant(parameter["vtarget"], StandardUnits.TARGET_VOLTAGE_MAGNITUDE) + slack + geoPosition == getGeometry(parameter["geoposition"]) + voltLvl == GermanVoltageLevelUtils.parse(parameter["voltlvl"], getQuant(parameter["vrated"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) as ComparableQuantity) + subnet == Integer.parseInt(parameter["subnet"]) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/OperatorInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/OperatorInputFactoryTest.groovy index b4b07b8d2..952734ae3 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/OperatorInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/OperatorInputFactoryTest.groovy @@ -39,8 +39,8 @@ class OperatorInputFactoryTest extends Specification { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/SwitchInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/SwitchInputFactoryTest.groovy index 48d087a6a..e346ff673 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/SwitchInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/SwitchInputFactoryTest.groovy @@ -47,15 +47,15 @@ class SwitchInputFactoryTest extends Specification implements FactoryTestHelper input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] - assert nodeA == nodeInputA - assert nodeB == nodeInputB - assert closed + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] + nodeA == nodeInputA + nodeB == nodeInputB + closed } } @@ -80,16 +80,16 @@ class SwitchInputFactoryTest extends Specification implements FactoryTestHelper input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] - assert nodeA == nodeInputA - assert nodeB == nodeInputB - assert closed - assert parallelDevices == 1 + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] + nodeA == nodeInputA + nodeB == nodeInputB + closed + parallelDevices == 1 } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalBusInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalBusInputFactoryTest.groovy index 9ef17d5d4..60ea92a16 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalBusInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalBusInputFactoryTest.groovy @@ -43,12 +43,12 @@ class ThermalBusInputFactoryTest extends Specification implements FactoryTestHel input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy index b2c1055c8..394e5c6dc 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/ThermalHouseInputFactoryTest.groovy @@ -50,18 +50,18 @@ class ThermalHouseInputFactoryTest extends Specification implements FactoryTestH input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] - assert thermalBus == thermalBusInput - assert ethLosses == getQuant(parameter["ethlosses"], StandardUnits.THERMAL_TRANSMISSION) - assert ethCapa == getQuant(parameter["ethcapa"], StandardUnits.HEAT_CAPACITY) - assert targetTemperature == getQuant(parameter["targetTemperature"], StandardUnits.TEMPERATURE) - assert upperTemperatureLimit == getQuant(parameter["upperTemperatureLimit"], StandardUnits.TEMPERATURE) - assert lowerTemperatureLimit == getQuant(parameter["lowerTemperatureLimit"], StandardUnits.TEMPERATURE) - assert housingType == parameter["housingType"] - assert numberInhabitants == parameter["numberInhabitants"].toDouble() + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] + thermalBus == thermalBusInput + ethLosses == getQuant(parameter["ethlosses"], StandardUnits.THERMAL_TRANSMISSION) + ethCapa == getQuant(parameter["ethcapa"], StandardUnits.HEAT_CAPACITY) + targetTemperature == getQuant(parameter["targetTemperature"], StandardUnits.TEMPERATURE) + upperTemperatureLimit == getQuant(parameter["upperTemperatureLimit"], StandardUnits.TEMPERATURE) + lowerTemperatureLimit == getQuant(parameter["lowerTemperatureLimit"], StandardUnits.TEMPERATURE) + housingType == parameter["housingType"] + numberInhabitants == parameter["numberInhabitants"].toDouble() } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/Transformer2WInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/Transformer2WInputFactoryTest.groovy index 99bd62bd3..f820c1001 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/Transformer2WInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/Transformer2WInputFactoryTest.groovy @@ -51,18 +51,18 @@ class Transformer2WInputFactoryTest extends Specification implements FactoryTest input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] - assert nodeA == nodeInputA - assert nodeB == nodeInputB - assert type == typeInput - assert parallelDevices == Integer.parseInt(parameter["paralleldevices"]) - assert tapPos == Integer.parseInt(parameter["tappos"]) - assert autoTap + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] + nodeA == nodeInputA + nodeB == nodeInputB + type == typeInput + parallelDevices == Integer.parseInt(parameter["paralleldevices"]) + tapPos == Integer.parseInt(parameter["tappos"]) + autoTap } } def "A Transformer2WInputFactory should throw an IllegalArgumentException if nodeA is on the lower voltage side"() { diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/Transformer3WInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/Transformer3WInputFactoryTest.groovy index 6ea95414d..89b278e3b 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/Transformer3WInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/Transformer3WInputFactoryTest.groovy @@ -50,17 +50,17 @@ class Transformer3WInputFactoryTest extends Specification implements FactoryTes input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] - assert nodeA == nodeInputA - assert nodeB == nodeInputB - assert nodeC == nodeInputC - assert type == typeInput - assert parallelDevices == Integer.parseInt(parameter["paralleldevices"]) - assert tapPos == Integer.parseInt(parameter["tappos"]) - assert autoTap + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] + nodeA == nodeInputA + nodeB == nodeInputB + nodeC == nodeInputC + type == typeInput + parallelDevices == Integer.parseInt(parameter["paralleldevices"]) + tapPos == Integer.parseInt(parameter["tappos"]) + autoTap } } def "A Transformer3WInputFactory should throw an IllegalArgumentException if nodeB is greater than nodeA or nodeC is greater than nodeB"() { diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/BmInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/BmInputFactoryTest.groovy index bd5067787..8610b613d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/BmInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/BmInputFactoryTest.groovy @@ -60,25 +60,25 @@ class BmInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert type == typeInput - assert !marketReaction - assert costControlled - assert feedInTariff == getQuant(parameter["feedintariff"], StandardUnits.ENERGY_PRICE) + controllingEm == Optional.of(emUnit) + type == typeInput + !marketReaction + costControlled + feedInTariff == getQuant(parameter["feedintariff"], StandardUnits.ENERGY_PRICE) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/ChpInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/ChpInputFactoryTest.groovy index 8c646691d..03f296b3d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/ChpInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/ChpInputFactoryTest.groovy @@ -61,23 +61,23 @@ class ChpInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert type == typeInput - assert marketReaction + controllingEm == Optional.of(emUnit) + type == typeInput + marketReaction } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvInputFactoryTest.groovy index 3f876b533..f3d17fc73 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvInputFactoryTest.groovy @@ -56,22 +56,22 @@ class EvInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert type == typeInput + controllingEm == Optional.of(emUnit) + type == typeInput } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactoryTest.groovy index 9d3ccd7ed..98fd26772 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/EvcsInputFactoryTest.groovy @@ -65,26 +65,26 @@ class EvcsInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PowerSystemUnits.PU), Quantities.getQuantity(1d, PowerSystemUnits.PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert type == ChargingPointTypeUtils.HouseholdSocket - assert chargingPoints == Integer.parseInt(parameter["chargingpoints"]) - assert cosPhiRated == Double.parseDouble(parameter["cosphirated"]) - assert locationType == EvcsLocationType.CHARGING_HUB_TOWN - assert !v2gSupport + controllingEm == Optional.of(emUnit) + type == ChargingPointTypeUtils.HouseholdSocket + chargingPoints == Integer.parseInt(parameter["chargingpoints"]) + cosPhiRated == Double.parseDouble(parameter["cosphirated"]) + locationType == EvcsLocationType.CHARGING_HUB_TOWN + !v2gSupport } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/FixedFeedInInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/FixedFeedInInputFactoryTest.groovy index 1c4c3effc..c2311bfe3 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/FixedFeedInInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/FixedFeedInInputFactoryTest.groovy @@ -57,22 +57,22 @@ class FixedFeedInInputFactoryTest extends Specification implements FactoryTestHe input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert !operationTime.endDate.present - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + !operationTime.endDate.present + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosphirated"]) + controllingEm == Optional.of(emUnit) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosphirated"]) } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/HpInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/HpInputFactoryTest.groovy index 6a81ca6fe..b21fed308 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/HpInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/HpInputFactoryTest.groovy @@ -58,23 +58,23 @@ class HpInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert type == typeInput - assert thermalBus == thermalBusInput + controllingEm == Optional.of(emUnit) + type == typeInput + thermalBus == thermalBusInput } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactoryTest.groovy index d3eaef18a..a5168f355 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/LoadInputFactoryTest.groovy @@ -58,22 +58,22 @@ class LoadInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime == OperationTime.notLimited() - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime == OperationTime.notLimited() + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert loadProfile == profile - assert eConsAnnual == getQuant(parameter["econsannual"], StandardUnits.ENERGY_IN) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosphirated"]) + controllingEm == Optional.of(emUnit) + loadProfile == profile + eConsAnnual == getQuant(parameter["econsannual"], StandardUnits.ENERGY_IN) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosphirated"]) } where: diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/PvInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/PvInputFactoryTest.groovy index 63714fdbf..2c1567d9a 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/PvInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/PvInputFactoryTest.groovy @@ -64,30 +64,30 @@ class PvInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert albedo == Double.parseDouble(parameter["albedo"]) - assert azimuth == getQuant(parameter["azimuth"], StandardUnits.AZIMUTH) - assert etaConv == getQuant(parameter["etaconv"], StandardUnits.EFFICIENCY) - assert elevationAngle == getQuant(parameter["elevationangle"], StandardUnits.SOLAR_ELEVATION_ANGLE) - assert kG == Double.parseDouble(parameter["kg"]) - assert kT == Double.parseDouble(parameter["kt"]) - assert marketReaction - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosphirated"]) + controllingEm == Optional.of(emUnit) + albedo == Double.parseDouble(parameter["albedo"]) + azimuth == getQuant(parameter["azimuth"], StandardUnits.AZIMUTH) + etaConv == getQuant(parameter["etaconv"], StandardUnits.EFFICIENCY) + elevationAngle == getQuant(parameter["elevationangle"], StandardUnits.SOLAR_ELEVATION_ANGLE) + kG == Double.parseDouble(parameter["kg"]) + kT == Double.parseDouble(parameter["kt"]) + marketReaction + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosphirated"]) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/StorageInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/StorageInputFactoryTest.groovy index bd546ec03..8a64ba3fb 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/StorageInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/StorageInputFactoryTest.groovy @@ -56,22 +56,22 @@ class StorageInputFactoryTest extends Specification implements FactoryTestHelper input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert operationTime.startDate.present - assert operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + operationTime.startDate.present + operationTime.startDate.get() == ZonedDateTime.parse(parameter["operatesfrom"]) + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert type == typeInput + controllingEm == Optional.of(emUnit) + type == typeInput } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/WecInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/WecInputFactoryTest.groovy index 6479fd9e4..32942deda 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/WecInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/input/participant/WecInputFactoryTest.groovy @@ -57,22 +57,22 @@ class WecInputFactoryTest extends Specification implements FactoryTestHelper { input.success input.data.get().getClass() == inputClass input.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert !operationTime.startDate.present - assert operationTime.endDate.present - assert operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) - assert operator == operatorInput - assert id == parameter["id"] - assert node == nodeInput - assert qCharacteristics.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid == UUID.fromString(parameter["uuid"]) + !operationTime.startDate.present + operationTime.endDate.present + operationTime.endDate.get() == ZonedDateTime.parse(parameter["operatesuntil"]) + operator == operatorInput + id == parameter["id"] + node == nodeInput + qCharacteristics.with { + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(0d, PU), Quantities.getQuantity(1d, PU)) ] as TreeSet) } - assert controllingEm == Optional.of(emUnit) - assert type == typeInput - assert marketReaction + controllingEm == Optional.of(emUnit) + type == typeInput + marketReaction } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/result/ConnectorResultFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/result/ConnectorResultFactoryTest.groovy index 0b338c553..e18f2b6af 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/result/ConnectorResultFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/result/ConnectorResultFactoryTest.groovy @@ -59,23 +59,23 @@ class ConnectorResultFactoryTest extends Specification implements FactoryTestHel result.success result.data.get().getClass() == resultingModelClass ((ConnectorResult) result.data.get()).with { - assert time == TIME_UTIL.toZonedDateTime(parameter["time"]) - assert inputModel == UUID.fromString(parameter["inputModel"]) - assert iAAng == getQuant(parameter["iaang"], StandardUnits.ELECTRIC_CURRENT_ANGLE) - assert iAMag == getQuant(parameter["iamag"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) - assert iBAng == getQuant(parameter["ibang"], StandardUnits.ELECTRIC_CURRENT_ANGLE) - assert iBMag == getQuant(parameter["ibmag"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) + time == TIME_UTIL.toZonedDateTime(parameter["time"]) + inputModel == UUID.fromString(parameter["inputModel"]) + iAAng == getQuant(parameter["iaang"], StandardUnits.ELECTRIC_CURRENT_ANGLE) + iAMag == getQuant(parameter["iamag"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) + iBAng == getQuant(parameter["ibang"], StandardUnits.ELECTRIC_CURRENT_ANGLE) + iBMag == getQuant(parameter["ibmag"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) } if (result.data.get().getClass() == Transformer2WResult) { - assert ((Transformer2WResult) result.data.get()).tapPos == Integer.parseInt(parameter["tappos"]) + ((Transformer2WResult) result.data.get()).tapPos == Integer.parseInt(parameter["tappos"]) } if (result.data.get().getClass() == Transformer3WResult) { Transformer3WResult transformer3WResult = ((Transformer3WResult) result.data.get()) - assert transformer3WResult.tapPos == Integer.parseInt(parameter["tappos"]) - assert transformer3WResult.iCAng == getQuant(parameter["icang"], StandardUnits.ELECTRIC_CURRENT_ANGLE) - assert transformer3WResult.iCMag == getQuant(parameter["icmag"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) + transformer3WResult.tapPos == Integer.parseInt(parameter["tappos"]) + transformer3WResult.iCAng == getQuant(parameter["icang"], StandardUnits.ELECTRIC_CURRENT_ANGLE) + transformer3WResult.iCMag == getQuant(parameter["icmag"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/result/FlexOptionsResultFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/result/FlexOptionsResultFactoryTest.groovy index a10c90643..88c709566 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/result/FlexOptionsResultFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/result/FlexOptionsResultFactoryTest.groovy @@ -42,11 +42,11 @@ class FlexOptionsResultFactoryTest extends Specification implements FactoryTestH result.success result.data.get().getClass() == FlexOptionsResult ((FlexOptionsResult) result.data.get()).with { - assert pRef == getQuant(parameter["pref"], StandardUnits.ACTIVE_POWER_RESULT) - assert pMin == getQuant(parameter["pmin"], StandardUnits.ACTIVE_POWER_RESULT) - assert pMax == getQuant(parameter["pmax"], StandardUnits.ACTIVE_POWER_RESULT) - assert time == TIME_UTIL.toZonedDateTime(parameter["time"]) - assert inputModel == UUID.fromString(parameter["inputModel"]) + pRef == getQuant(parameter["pref"], StandardUnits.ACTIVE_POWER_RESULT) + pMin == getQuant(parameter["pmin"], StandardUnits.ACTIVE_POWER_RESULT) + pMax == getQuant(parameter["pmax"], StandardUnits.ACTIVE_POWER_RESULT) + time == TIME_UTIL.toZonedDateTime(parameter["time"]) + inputModel == UUID.fromString(parameter["inputModel"]) } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/result/NodeResultFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/result/NodeResultFactoryTest.groovy index 957aff2b2..5d79e19b8 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/result/NodeResultFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/result/NodeResultFactoryTest.groovy @@ -41,10 +41,10 @@ class NodeResultFactoryTest extends Specification implements FactoryTestHelper { result.success result.data.get().getClass() == NodeResult ((NodeResult) result.data.get()).with { - assert vMag == getQuant(parameter["vmag"], StandardUnits.VOLTAGE_MAGNITUDE) - assert vAng == getQuant(parameter["vang"], StandardUnits.VOLTAGE_ANGLE) - assert time == TIME_UTIL.toZonedDateTime(parameter["time"]) - assert inputModel == UUID.fromString(parameter["inputModel"]) + vMag == getQuant(parameter["vmag"], StandardUnits.VOLTAGE_MAGNITUDE) + vAng == getQuant(parameter["vang"], StandardUnits.VOLTAGE_ANGLE) + time == TIME_UTIL.toZonedDateTime(parameter["time"]) + inputModel == UUID.fromString(parameter["inputModel"]) } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/result/SwitchResultFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/result/SwitchResultFactoryTest.groovy index a025078a4..205067838 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/result/SwitchResultFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/result/SwitchResultFactoryTest.groovy @@ -41,9 +41,9 @@ class SwitchResultFactoryTest extends Specification implements FactoryTestHelper result.success result.data.get().getClass() == SwitchResult ((SwitchResult) result.data.get()).with { - assert time == TIME_UTIL.toZonedDateTime(parameter["time"]) - assert inputModel == UUID.fromString(parameter["inputModel"]) - assert closed == Boolean.parseBoolean(parameter["closed"]) + time == TIME_UTIL.toZonedDateTime(parameter["time"]) + inputModel == UUID.fromString(parameter["inputModel"]) + closed == Boolean.parseBoolean(parameter["closed"]) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/result/SystemParticipantResultFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/result/SystemParticipantResultFactoryTest.groovy index 31399a1a5..bdea58ee9 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/result/SystemParticipantResultFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/result/SystemParticipantResultFactoryTest.groovy @@ -62,18 +62,18 @@ class SystemParticipantResultFactoryTest extends Specification implements Factor result.success result.data.get().getClass() == resultingModelClass ((SystemParticipantResult) result.data.get()).with { - assert p == getQuant(parameter["p"], StandardUnits.ACTIVE_POWER_RESULT) - assert q == getQuant(parameter["q"], StandardUnits.REACTIVE_POWER_RESULT) - assert time == TIME_UTIL.toZonedDateTime(parameter["time"]) - assert inputModel == UUID.fromString(parameter["inputModel"]) + p == getQuant(parameter["p"], StandardUnits.ACTIVE_POWER_RESULT) + q == getQuant(parameter["q"], StandardUnits.REACTIVE_POWER_RESULT) + time == TIME_UTIL.toZonedDateTime(parameter["time"]) + inputModel == UUID.fromString(parameter["inputModel"]) } if (modelClass == EvResult) { - assert (((EvResult) result.data.get()).soc == getQuant(parameter["soc"], Units.PERCENT)) + (((EvResult) result.data.get()).soc == getQuant(parameter["soc"], Units.PERCENT)) } if (modelClass == StorageResult) { - assert (((StorageResult) result.data.get()).soc == getQuant(parameter["soc"], Units.PERCENT)) + (((StorageResult) result.data.get()).soc == getQuant(parameter["soc"], Units.PERCENT)) } if (modelClass == HpResult) { @@ -116,11 +116,11 @@ class SystemParticipantResultFactoryTest extends Specification implements Factor result.success result.data.get().getClass() == StorageResult ((StorageResult) result.data.get()).with { - assert p == getQuant(parameter["p"], StandardUnits.ACTIVE_POWER_RESULT) - assert q == getQuant(parameter["q"], StandardUnits.REACTIVE_POWER_RESULT) - assert soc == getQuant(parameter["soc"], Units.PERCENT) - assert time == TIME_UTIL.toZonedDateTime(parameter["time"]) - assert inputModel == UUID.fromString(parameter["inputModel"]) + p == getQuant(parameter["p"], StandardUnits.ACTIVE_POWER_RESULT) + q == getQuant(parameter["q"], StandardUnits.REACTIVE_POWER_RESULT) + soc == getQuant(parameter["soc"], Units.PERCENT) + time == TIME_UTIL.toZonedDateTime(parameter["time"]) + inputModel == UUID.fromString(parameter["inputModel"]) } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/result/ThermalResultFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/result/ThermalResultFactoryTest.groovy index fa95f7d6f..3e4d4fec4 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/result/ThermalResultFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/result/ThermalResultFactoryTest.groovy @@ -49,11 +49,11 @@ class ThermalResultFactoryTest extends Specification implements FactoryTestHelpe result.success result.data.get().getClass() == CylindricalStorageResult ((CylindricalStorageResult) result.data.get()).with { - assert time == TIME_UTIL.toZonedDateTime(parameter.get("time")) - assert inputModel == UUID.fromString(parameter.get("inputModel")) - assert qDot == Quantities.getQuantity(Double.parseDouble(parameter.get("qDot")), StandardUnits.HEAT_DEMAND) - assert energy == Quantities.getQuantity(Double.parseDouble(parameter.get("energy")), StandardUnits.ENERGY_RESULT) - assert fillLevel == Quantities.getQuantity(Double.parseDouble(parameter.get("fillLevel")), StandardUnits.FILL_LEVEL) + time == TIME_UTIL.toZonedDateTime(parameter.get("time")) + inputModel == UUID.fromString(parameter.get("inputModel")) + qDot == Quantities.getQuantity(Double.parseDouble(parameter.get("qDot")), StandardUnits.HEAT_DEMAND) + energy == Quantities.getQuantity(Double.parseDouble(parameter.get("energy")), StandardUnits.ENERGY_RESULT) + fillLevel == Quantities.getQuantity(Double.parseDouble(parameter.get("fillLevel")), StandardUnits.FILL_LEVEL) } } @@ -74,11 +74,11 @@ class ThermalResultFactoryTest extends Specification implements FactoryTestHelpe result.success result.data.get().getClass() == DomesticHotWaterStorageResult ((DomesticHotWaterStorageResult) result.data.get()).with { - assert time == TIME_UTIL.toZonedDateTime(parameter.get("time")) - assert inputModel == UUID.fromString(parameter.get("inputModel")) - assert qDot == Quantities.getQuantity(Double.parseDouble(parameter.get("qDot")), StandardUnits.HEAT_DEMAND) - assert energy == Quantities.getQuantity(Double.parseDouble(parameter.get("energy")), StandardUnits.ENERGY_RESULT) - assert fillLevel == Quantities.getQuantity(Double.parseDouble(parameter.get("fillLevel")), StandardUnits.FILL_LEVEL) + time == TIME_UTIL.toZonedDateTime(parameter.get("time")) + inputModel == UUID.fromString(parameter.get("inputModel")) + qDot == Quantities.getQuantity(Double.parseDouble(parameter.get("qDot")), StandardUnits.HEAT_DEMAND) + energy == Quantities.getQuantity(Double.parseDouble(parameter.get("energy")), StandardUnits.ENERGY_RESULT) + fillLevel == Quantities.getQuantity(Double.parseDouble(parameter.get("fillLevel")), StandardUnits.FILL_LEVEL) } } @@ -98,10 +98,10 @@ class ThermalResultFactoryTest extends Specification implements FactoryTestHelpe result.success result.data.get().getClass() == ThermalHouseResult ((ThermalHouseResult) result.data.get()).with { - assert time == TIME_UTIL.toZonedDateTime(parameter.get("time")) - assert inputModel == UUID.fromString(parameter.get("inputModel")) - assert qDot == Quantities.getQuantity(Double.parseDouble(parameter.get("qDot")), StandardUnits.HEAT_DEMAND) - assert indoorTemperature == Quantities.getQuantity(Double.parseDouble(parameter.get("indoorTemperature")), StandardUnits.TEMPERATURE) + time == TIME_UTIL.toZonedDateTime(parameter.get("time")) + inputModel == UUID.fromString(parameter.get("inputModel")) + qDot == Quantities.getQuantity(Double.parseDouble(parameter.get("qDot")), StandardUnits.HEAT_DEMAND) + indoorTemperature == Quantities.getQuantity(Double.parseDouble(parameter.get("indoorTemperature")), StandardUnits.TEMPERATURE) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactoryTest.groovy index b761b2842..1242e3c4d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoIdCoordinateFactoryTest.groovy @@ -72,8 +72,8 @@ class CosmoIdCoordinateFactoryTest extends Specification { then: actual.success actual.data.get().with { - assert it.id() == expectedIdCoordinate.id() - assert it.point().equalsExact(expectedIdCoordinate.point(), 1E-6) + it.id() == expectedIdCoordinate.id() + it.point().equalsExact(expectedIdCoordinate.point(), 1E-6) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactoryTest.groovy index 4672a938f..0884479bf 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconIdCoordinateFactoryTest.groovy @@ -66,8 +66,8 @@ class IconIdCoordinateFactoryTest extends Specification { then: actual.success actual.data.get().with { - assert it.id() == expectedIdCoordinate.id() - assert it.point().equalsExact(expectedIdCoordinate.point(), 1E-6) + it.id() == expectedIdCoordinate.id() + it.point().equalsExact(expectedIdCoordinate.point(), 1E-6) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactoryTest.groovy index cac18982c..8f27de60d 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/IconTimeBasedWeatherValueFactoryTest.groovy @@ -113,18 +113,18 @@ class IconTimeBasedWeatherValueFactoryTest extends Specification { then: actual.with { - assert it.time == TimeUtil.withDefaults.toZonedDateTime("2019-08-01T01:00:00Z") - assert it.value.coordinate == coordinate - assert it.value.solarIrradiance.directIrradiance.present - assert it.value.solarIrradiance.directIrradiance.get() == Quantities.getQuantity(0.002317613203124999, PowerSystemUnits.KILOWATT_PER_SQUAREMETRE) - assert it.value.solarIrradiance.diffuseIrradiance.present - assert it.value.solarIrradiance.diffuseIrradiance.get() == Quantities.getQuantity(0.0018088226191406245, PowerSystemUnits.KILOWATT_PER_SQUAREMETRE) - assert it.value.temperature.temperature.present - assert QuantityUtil.isEquivalentAbs(it.value.temperature.temperature.get(), Quantities.getQuantity(15.9679319051744, Units.CELSIUS)) - assert it.value.wind.direction.present - assert QuantityUtil.isEquivalentAbs(it.value.wind.direction.get(), Quantities.getQuantity(214.16711674907722, PowerSystemUnits.DEGREE_GEOM)) - assert it.value.wind.velocity.present - assert QuantityUtil.isEquivalentAbs(it.value.wind.velocity.get(), Quantities.getQuantity(4.640010877529081, PowerSystemUnits.METRE_PER_SECOND)) + it.time == TimeUtil.withDefaults.toZonedDateTime("2019-08-01T01:00:00Z") + it.value.coordinate == coordinate + it.value.solarIrradiance.directIrradiance.present + it.value.solarIrradiance.directIrradiance.get() == Quantities.getQuantity(0.002317613203124999, PowerSystemUnits.KILOWATT_PER_SQUAREMETRE) + it.value.solarIrradiance.diffuseIrradiance.present + it.value.solarIrradiance.diffuseIrradiance.get() == Quantities.getQuantity(0.0018088226191406245, PowerSystemUnits.KILOWATT_PER_SQUAREMETRE) + it.value.temperature.temperature.present + QuantityUtil.isEquivalentAbs(it.value.temperature.temperature.get(), Quantities.getQuantity(15.9679319051744, Units.CELSIUS)) + it.value.wind.direction.present + QuantityUtil.isEquivalentAbs(it.value.wind.direction.get(), Quantities.getQuantity(214.16711674907722, PowerSystemUnits.DEGREE_GEOM)) + it.value.wind.velocity.present + QuantityUtil.isEquivalentAbs(it.value.wind.velocity.get(), Quantities.getQuantity(4.640010877529081, PowerSystemUnits.METRE_PER_SECOND)) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy index 1cc7f75e3..3895cca72 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy @@ -27,13 +27,11 @@ class TimeBasedSimpleValueFactoryTest extends Specification { } def "The simple time based value factory provides correct fields"() { - given: + when: def factory = new TimeBasedSimpleValueFactory(valueClass) - def data = Mock(SimpleTimeBasedValueData) - data.targetClass >> valueClass - expect: - factory.getFields(data.targetClass) == expectedFields + then: + factory.getFields(valueClass) == expectedFields where: valueClass || expectedFields diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactoryTest.groovy index 321576903..267dde925 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/LineTypeInputFactoryTest.groovy @@ -46,14 +46,14 @@ class LineTypeInputFactoryTest extends Specification implements FactoryTestHelpe typeInput.success typeInput.data.get().getClass() == typeInputClass typeInput.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert b == getQuant(parameter["b"], StandardUnits.SUSCEPTANCE_PER_LENGTH) - assert g == getQuant(parameter["g"], StandardUnits.CONDUCTANCE_PER_LENGTH) - assert r == getQuant(parameter["r"], StandardUnits.RESISTANCE_PER_LENGTH) - assert x == getQuant(parameter["x"], StandardUnits.REACTANCE_PER_LENGTH) - assert iMax == getQuant(parameter["imax"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) - assert vRated == getQuant(parameter["vrated"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + b == getQuant(parameter["b"], StandardUnits.SUSCEPTANCE_PER_LENGTH) + g == getQuant(parameter["g"], StandardUnits.CONDUCTANCE_PER_LENGTH) + r == getQuant(parameter["r"], StandardUnits.RESISTANCE_PER_LENGTH) + x == getQuant(parameter["x"], StandardUnits.REACTANCE_PER_LENGTH) + iMax == getQuant(parameter["imax"], StandardUnits.ELECTRIC_CURRENT_MAGNITUDE) + vRated == getQuant(parameter["vrated"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactoryTest.groovy index 95e44f71e..ea86cbb31 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/SystemParticipantTypeInputFactoryTest.groovy @@ -64,16 +64,16 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac typeInput.data.get().getClass() == typeInputClass ((EvTypeInput) typeInput.data.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert capex == getQuant(parameter["capex"], StandardUnits.CAPEX) - assert opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) - - assert eStorage == getQuant(parameter["estorage"], StandardUnits.ENERGY_IN) - assert eCons == getQuant(parameter["econs"], StandardUnits.ENERGY_PER_DISTANCE) - assert sRatedDC == getQuant(parameter["srateddc"], StandardUnits.ACTIVE_POWER_IN) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + capex == getQuant(parameter["capex"], StandardUnits.CAPEX) + opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) + + eStorage == getQuant(parameter["estorage"], StandardUnits.ENERGY_IN) + eCons == getQuant(parameter["econs"], StandardUnits.ENERGY_PER_DISTANCE) + sRatedDC == getQuant(parameter["srateddc"], StandardUnits.ACTIVE_POWER_IN) } } @@ -100,14 +100,14 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac typeInput.data.get().getClass() == typeInputClass ((HpTypeInput) typeInput.data.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert capex == getQuant(parameter["capex"], StandardUnits.CAPEX) - assert opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) - - assert pThermal == getQuant(parameter["pthermal"], StandardUnits.ACTIVE_POWER_IN) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + capex == getQuant(parameter["capex"], StandardUnits.CAPEX) + opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) + + pThermal == getQuant(parameter["pthermal"], StandardUnits.ACTIVE_POWER_IN) } } @@ -134,15 +134,15 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac typeInput.data.get().getClass() == typeInputClass ((BmTypeInput) typeInput.data.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert capex == getQuant(parameter["capex"], StandardUnits.CAPEX) - assert opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) - - assert activePowerGradient == getQuant(parameter["activepowergradient"], StandardUnits.ACTIVE_POWER_GRADIENT) - assert etaConv == getQuant(parameter["etaconv"], StandardUnits.EFFICIENCY) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + capex == getQuant(parameter["capex"], StandardUnits.CAPEX) + opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) + + activePowerGradient == getQuant(parameter["activepowergradient"], StandardUnits.ACTIVE_POWER_GRADIENT) + etaConv == getQuant(parameter["etaconv"], StandardUnits.EFFICIENCY) } } @@ -172,24 +172,24 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac typeInput.data.get().getClass() == typeInputClass ((WecTypeInput) typeInput.data.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert capex == getQuant(parameter["capex"], StandardUnits.CAPEX) - assert opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + capex == getQuant(parameter["capex"], StandardUnits.CAPEX) + opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) cpCharacteristic.with { - assert uuid != null - assert points == Collections.unmodifiableSortedSet([ + uuid != null + points == Collections.unmodifiableSortedSet([ new CharacteristicPoint(Quantities.getQuantity(10d, METRE_PER_SECOND), Quantities.getQuantity(0.05, PU)), new CharacteristicPoint(Quantities.getQuantity(15d, METRE_PER_SECOND), Quantities.getQuantity(0.1, PU)), new CharacteristicPoint(Quantities.getQuantity(20d, METRE_PER_SECOND), Quantities.getQuantity(0.2, PU)) ] as TreeSet) } - assert etaConv == getQuant(parameter["etaconv"], StandardUnits.EFFICIENCY) - assert rotorArea == getQuant(parameter["rotorarea"], StandardUnits.ROTOR_AREA) - assert hubHeight == getQuant(parameter["hubheight"], StandardUnits.HUB_HEIGHT) + etaConv == getQuant(parameter["etaconv"], StandardUnits.EFFICIENCY) + rotorArea == getQuant(parameter["rotorarea"], StandardUnits.ROTOR_AREA) + hubHeight == getQuant(parameter["hubheight"], StandardUnits.HUB_HEIGHT) } } @@ -219,17 +219,17 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac typeInput.data.get().getClass() == typeInputClass ((ChpTypeInput) typeInput.data.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert capex == getQuant(parameter["capex"], StandardUnits.CAPEX) - assert opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) - - assert etaEl == getQuant(parameter["etael"], StandardUnits.EFFICIENCY) - assert etaThermal == getQuant(parameter["etathermal"], StandardUnits.EFFICIENCY) - assert pThermal == getQuant(parameter["pthermal"], StandardUnits.ACTIVE_POWER_IN) - assert pOwn == getQuant(parameter["pown"], StandardUnits.ACTIVE_POWER_IN) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + capex == getQuant(parameter["capex"], StandardUnits.CAPEX) + opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) + + etaEl == getQuant(parameter["etael"], StandardUnits.EFFICIENCY) + etaThermal == getQuant(parameter["etathermal"], StandardUnits.EFFICIENCY) + pThermal == getQuant(parameter["pthermal"], StandardUnits.ACTIVE_POWER_IN) + pOwn == getQuant(parameter["pown"], StandardUnits.ACTIVE_POWER_IN) } } @@ -259,17 +259,17 @@ class SystemParticipantTypeInputFactoryTest extends Specification implements Fac typeInput.data.get().getClass() == typeInputClass ((StorageTypeInput) typeInput.data.get()).with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert capex == getQuant(parameter["capex"], StandardUnits.CAPEX) - assert opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) - - assert eStorage == getQuant(parameter["estorage"], StandardUnits.ENERGY_IN) - assert pMax == getQuant(parameter["pmax"], StandardUnits.ACTIVE_POWER_IN) - assert activePowerGradient == getQuant(parameter["activepowergradient"], StandardUnits.ACTIVE_POWER_GRADIENT) - assert eta == getQuant(parameter["eta"], StandardUnits.EFFICIENCY) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + capex == getQuant(parameter["capex"], StandardUnits.CAPEX) + opex == getQuant(parameter["opex"], StandardUnits.ENERGY_PRICE) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + cosPhiRated == Double.parseDouble(parameter["cosPhiRated"]) + + eStorage == getQuant(parameter["estorage"], StandardUnits.ENERGY_IN) + pMax == getQuant(parameter["pmax"], StandardUnits.ACTIVE_POWER_IN) + activePowerGradient == getQuant(parameter["activepowergradient"], StandardUnits.ACTIVE_POWER_GRADIENT) + eta == getQuant(parameter["eta"], StandardUnits.EFFICIENCY) } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/Transformer2WTypeInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/Transformer2WTypeInputFactoryTest.groovy index b6f094353..2cbd7dbc7 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/Transformer2WTypeInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/Transformer2WTypeInputFactoryTest.groovy @@ -54,21 +54,21 @@ class Transformer2WTypeInputFactoryTest extends Specification implements Factory typeInput.data.get().getClass() == typeInputClass typeInput.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert rSc == getQuant(parameter["rsc"], StandardUnits.RESISTANCE) - assert xSc == getQuant(parameter["xsc"], StandardUnits.REACTANCE) - assert sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) - assert vRatedA == getQuant(parameter["vrateda"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) - assert vRatedB == getQuant(parameter["vratedb"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) - assert gM == getQuant(parameter["gm"], StandardUnits.CONDUCTANCE) - assert bM == getQuant(parameter["bm"], StandardUnits.SUSCEPTANCE) - assert dV == getQuant(parameter["dv"], StandardUnits.DV_TAP) - assert dPhi == getQuant(parameter["dphi"], StandardUnits.DPHI_TAP) - assert tapSide == (parameter["tapside"].trim() == "1") || parameter["tapside"].trim() == "true" - assert tapNeutr == Integer.parseInt(parameter["tapneutr"]) - assert tapMin == Integer.parseInt(parameter["tapmin"]) - assert tapMax == Integer.parseInt(parameter["tapmax"]) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + rSc == getQuant(parameter["rsc"], StandardUnits.RESISTANCE) + xSc == getQuant(parameter["xsc"], StandardUnits.REACTANCE) + sRated == getQuant(parameter["srated"], StandardUnits.S_RATED) + vRatedA == getQuant(parameter["vrateda"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) + vRatedB == getQuant(parameter["vratedb"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) + gM == getQuant(parameter["gm"], StandardUnits.CONDUCTANCE) + bM == getQuant(parameter["bm"], StandardUnits.SUSCEPTANCE) + dV == getQuant(parameter["dv"], StandardUnits.DV_TAP) + dPhi == getQuant(parameter["dphi"], StandardUnits.DPHI_TAP) + tapSide == (parameter["tapside"].trim() == "1") || parameter["tapside"].trim() == "true" + tapNeutr == Integer.parseInt(parameter["tapneutr"]) + tapMin == Integer.parseInt(parameter["tapmin"]) + tapMax == Integer.parseInt(parameter["tapmax"]) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/Transformer3WTypeInputFactoryTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/Transformer3WTypeInputFactoryTest.groovy index e040a2132..dd92cf276 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/Transformer3WTypeInputFactoryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/factory/typeinput/Transformer3WTypeInputFactoryTest.groovy @@ -60,27 +60,27 @@ class Transformer3WTypeInputFactoryTest extends Specification implements Factory typeInput.data.get().getClass() == typeInputClass typeInput.data.get().with { - assert uuid == UUID.fromString(parameter["uuid"]) - assert id == parameter["id"] - assert sRatedA == getQuant(parameter["srateda"], StandardUnits.S_RATED) - assert sRatedB == getQuant(parameter["sratedb"], StandardUnits.S_RATED) - assert sRatedC == getQuant(parameter["sratedc"], StandardUnits.S_RATED) - assert vRatedA == getQuant(parameter["vrateda"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) - assert vRatedB == getQuant(parameter["vratedb"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) - assert vRatedC == getQuant(parameter["vratedc"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) - assert rScA == getQuant(parameter["rsca"], StandardUnits.RESISTANCE) - assert rScB == getQuant(parameter["rscb"], StandardUnits.RESISTANCE) - assert rScC == getQuant(parameter["rscc"], StandardUnits.RESISTANCE) - assert xScA == getQuant(parameter["xsca"], StandardUnits.REACTANCE) - assert xScB == getQuant(parameter["xscb"], StandardUnits.REACTANCE) - assert xScC == getQuant(parameter["xscc"], StandardUnits.REACTANCE) - assert gM == getQuant(parameter["gm"], StandardUnits.CONDUCTANCE) - assert bM == getQuant(parameter["bm"], StandardUnits.SUSCEPTANCE) - assert dV == getQuant(parameter["dv"], StandardUnits.DV_TAP) - assert dPhi == getQuant(parameter["dphi"], StandardUnits.DPHI_TAP) - assert tapNeutr == Integer.parseInt(parameter["tapneutr"]) - assert tapMin == Integer.parseInt(parameter["tapmin"]) - assert tapMax == Integer.parseInt(parameter["tapmax"]) + uuid == UUID.fromString(parameter["uuid"]) + id == parameter["id"] + sRatedA == getQuant(parameter["srateda"], StandardUnits.S_RATED) + sRatedB == getQuant(parameter["sratedb"], StandardUnits.S_RATED) + sRatedC == getQuant(parameter["sratedc"], StandardUnits.S_RATED) + vRatedA == getQuant(parameter["vrateda"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) + vRatedB == getQuant(parameter["vratedb"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) + vRatedC == getQuant(parameter["vratedc"], StandardUnits.RATED_VOLTAGE_MAGNITUDE) + rScA == getQuant(parameter["rsca"], StandardUnits.RESISTANCE) + rScB == getQuant(parameter["rscb"], StandardUnits.RESISTANCE) + rScC == getQuant(parameter["rscc"], StandardUnits.RESISTANCE) + xScA == getQuant(parameter["xsca"], StandardUnits.REACTANCE) + xScB == getQuant(parameter["xscb"], StandardUnits.REACTANCE) + xScC == getQuant(parameter["xscc"], StandardUnits.REACTANCE) + gM == getQuant(parameter["gm"], StandardUnits.CONDUCTANCE) + bM == getQuant(parameter["bm"], StandardUnits.SUSCEPTANCE) + dV == getQuant(parameter["dv"], StandardUnits.DV_TAP) + dPhi == getQuant(parameter["dphi"], StandardUnits.DPHI_TAP) + tapNeutr == Integer.parseInt(parameter["tapneutr"]) + tapMin == Integer.parseInt(parameter["tapmin"]) + tapMax == Integer.parseInt(parameter["tapmax"]) } } } \ No newline at end of file diff --git a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy index 3b12faef4..700ddf849 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/naming/FileNamingStrategyTest.groovy @@ -816,8 +816,8 @@ class FileNamingStrategyTest extends Specification { then: IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) (metaInformation as IndividualTimeSeriesMetaInformation).with { - assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") - assert it.columnScheme == expectedColumnScheme + it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") + it.columnScheme == expectedColumnScheme } where: @@ -842,8 +842,8 @@ class FileNamingStrategyTest extends Specification { then: IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) (metaInformation as IndividualTimeSeriesMetaInformation).with { - assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") - assert it.columnScheme == expectedColumnScheme + it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") + it.columnScheme == expectedColumnScheme } where: @@ -867,8 +867,8 @@ class FileNamingStrategyTest extends Specification { then: IndividualTimeSeriesMetaInformation.isAssignableFrom(metaInformation.getClass()) (metaInformation as IndividualTimeSeriesMetaInformation).with { - assert it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") - assert it.columnScheme == expectedColumnScheme + it.uuid == UUID.fromString("4881fda2-bcee-4f4f-a5bb-6a09bf785276") + it.columnScheme == expectedColumnScheme } where: @@ -919,7 +919,7 @@ class FileNamingStrategyTest extends Specification { then: LoadProfileMetaInformation.isAssignableFrom(metaInformation.getClass()) (metaInformation as LoadProfileMetaInformation).with { - assert profile == "g3" + profile == "g3" } } @@ -934,7 +934,7 @@ class FileNamingStrategyTest extends Specification { then: LoadProfileMetaInformation.isAssignableFrom(metaInformation.getClass()) (metaInformation as LoadProfileMetaInformation).with { - assert profile == "g3" + profile == "g3" } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorTest.groovy index a5572e075..9878ddd93 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/processor/timeseries/TimeSeriesProcessorTest.groovy @@ -33,16 +33,16 @@ class TimeSeriesProcessorTest extends Specification implements TimeSeriesTestDat then: processor.with { /* Check for attributes in higher classes also they are ignored by the class itself. */ - assert processor.registeredClass == IndividualTimeSeries + processor.registeredClass == IndividualTimeSeries - assert processor.registeredKey == new TimeSeriesProcessorKey(IndividualTimeSeries, TimeBasedValue, EnergyPriceValue) - assert processor.fieldToSource.size() == expectedSourceMapping.size() + processor.registeredKey == new TimeSeriesProcessorKey(IndividualTimeSeries, TimeBasedValue, EnergyPriceValue) + processor.fieldToSource.size() == expectedSourceMapping.size() processor.fieldToSource.each { key, value -> - assert expectedSourceMapping.containsKey(key) - assert expectedSourceMapping.get(key) == value.source() + expectedSourceMapping.containsKey(key) + expectedSourceMapping.get(key) == value.source() } /* Also test the logic of TimeSeriesProcessor#buildFieldToSource, because it is invoked during instantiation */ - assert processor.headerElements == [ + processor.headerElements == [ "price", "time" ] as String[] diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/AssetEntitySourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/AssetEntitySourceTest.groovy index b92fd09a2..4e8b9a83b 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/AssetEntitySourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/AssetEntitySourceTest.groovy @@ -91,9 +91,9 @@ class AssetEntitySourceTest extends Specification { actual.size() == 1 actual.get(0).with { // we only want to test of enriching with nodes and type worked as expected - assert it.nodeA == GridTestData.nodeA - assert it.nodeB == GridTestData.nodeB - assert it.type == GridTestData.lineTypeInputCtoD + it.nodeA == GridTestData.nodeA + it.nodeB == GridTestData.nodeB + it.type == GridTestData.lineTypeInputCtoD } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/ThermalSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/ThermalSourceTest.groovy index 99f771ff9..9e32db19f 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/ThermalSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/ThermalSourceTest.groovy @@ -30,8 +30,8 @@ class ThermalSourceTest extends Specification { then: actual.success actual.data.get().with { - assert it.operatorInput == OperatorInput.NO_OPERATOR_ASSIGNED - assert it.busInput == bus + it.operatorInput == OperatorInput.NO_OPERATOR_ASSIGNED + it.busInput == bus } } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy index 6c62c4338..d24fdc70c 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvRawGridSourceTest.groovy @@ -47,18 +47,18 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { def expected = expectedSet.find { it.uuid == actual.uuid } - assert expected != null + expected != null actual.with { - assert uuid == expected.uuid - assert id == expected.id - assert operator == expected.operator - assert operationTime == expected.operationTime - assert vTarget == expected.vTarget - assert slack == expected.slack - assert geoPosition.coordinates == expected.geoPosition.coordinates - assert voltLvl == expected.voltLvl - assert subnet == expected.subnet + uuid == expected.uuid + id == expected.id + operator == expected.operator + operationTime == expected.operationTime + vTarget == expected.vTarget + slack == expected.slack + geoPosition.coordinates == expected.geoPosition.coordinates + voltLvl == expected.voltLvl + subnet == expected.subnet } } } @@ -74,18 +74,18 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { actualSet.size() == expectedSet.size() actualSet.each {actual -> def expected = expectedSet.find {it.uuid == actual.uuid} - assert expected != null + expected != null actual.with { - assert uuid == expected.uuid - assert id == expected.id - assert operator == expected.operator - assert operationTime == expected.operationTime - assert node.uuid == expected.node.uuid - assert vMag == expected.vMag - assert vAng == expected.vAng - assert p == expected.p - assert q == expected.q + uuid == expected.uuid + id == expected.id + operator == expected.operator + operationTime == expected.operationTime + node.uuid == expected.node.uuid + vMag == expected.vMag + vAng == expected.vAng + p == expected.p + q == expected.q } } } @@ -99,16 +99,16 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { actualSet.size() == expectedSet.size() actualSet.each {actual -> def expected = expectedSet.find {it.uuid == actual.uuid} - assert expected != null + expected != null actual.with { - assert uuid == expected.uuid - assert id == expected.id - assert operator == expected.operator - assert operationTime == expected.operationTime - assert nodeA.uuid == expected.nodeA.uuid - assert nodeB.uuid == expected.nodeB.uuid - assert closed == expected.closed + uuid == expected.uuid + id == expected.id + operator == expected.operator + operationTime == expected.operationTime + nodeA.uuid == expected.nodeA.uuid + nodeB.uuid == expected.nodeB.uuid + closed == expected.closed } } } @@ -126,20 +126,20 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { actualSet.each { entry -> def actual = entry.value def expected = expectedSet.find {it.uuid == actual.uuid} - assert expected != null + expected != null actual.with { - assert uuid == expected.uuid - assert id == expected.id - assert operator == expected.operator - assert operationTime == expected.operationTime - assert nodeA.uuid == expected.nodeA.uuid - assert nodeB.uuid == expected.nodeB.uuid - assert parallelDevices == expected.parallelDevices - assert type == expected.type - assert length == expected.length - assert geoPosition.coordinates == expected.geoPosition.coordinates - assert olmCharacteristic == expected.olmCharacteristic + uuid == expected.uuid + id == expected.id + operator == expected.operator + operationTime == expected.operationTime + nodeA.uuid == expected.nodeA.uuid + nodeB.uuid == expected.nodeB.uuid + parallelDevices == expected.parallelDevices + type == expected.type + length == expected.length + geoPosition.coordinates == expected.geoPosition.coordinates + olmCharacteristic == expected.olmCharacteristic } } } @@ -159,19 +159,19 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { actualSet.size() == expectedSet.size() actualSet.each {actual -> def expected = expectedSet.find {it.uuid == actual.uuid} - assert expected != null + expected != null actual.with { - assert uuid == expected.uuid - assert id == expected.id - assert operator == expected.operator - assert operationTime == expected.operationTime - assert nodeA.uuid == expected.nodeA.uuid - assert nodeB.uuid == expected.nodeB.uuid - assert parallelDevices == expected.parallelDevices - assert type == expected.type - assert tapPos == expected.tapPos - assert autoTap == expected.autoTap + uuid == expected.uuid + id == expected.id + operator == expected.operator + operationTime == expected.operationTime + nodeA.uuid == expected.nodeA.uuid + nodeB.uuid == expected.nodeB.uuid + parallelDevices == expected.parallelDevices + type == expected.type + tapPos == expected.tapPos + autoTap == expected.autoTap } } } @@ -187,20 +187,20 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { actualSet.size() == expectedSet.size() actualSet.each {actual -> def expected = expectedSet.find {it.uuid == actual.uuid} - assert expected != null + expected != null actual.with { - assert uuid == expected.uuid - assert id == expected.id - assert operator == expected.operator - assert operationTime == expected.operationTime - assert nodeA.uuid == expected.nodeA.uuid - assert nodeB.uuid == expected.nodeB.uuid - assert nodeC.uuid == expected.nodeC.uuid - assert parallelDevices == expected.parallelDevices - assert type == expected.type - assert tapPos == expected.tapPos - assert autoTap == expected.autoTap + uuid == expected.uuid + id == expected.id + operator == expected.operator + operationTime == expected.operationTime + nodeA.uuid == expected.nodeA.uuid + nodeB.uuid == expected.nodeB.uuid + nodeC.uuid == expected.nodeC.uuid + parallelDevices == expected.parallelDevices + type == expected.type + tapPos == expected.tapPos + autoTap == expected.autoTap } } } @@ -242,18 +242,18 @@ class CsvRawGridSourceTest extends Specification implements CsvTestDataMeta { actual != null actual.with { /* It's okay, to only test the uuids, because content is tested with the other test methods */ - assert nodes.size() == expected.nodes.size() - assert nodes.each {entry -> expected.nodes.contains({it.uuid == entry.uuid})} - assert lines.size() == expected.lines.size() - assert lines.each {entry -> expected.lines.contains({it.uuid == entry.uuid})} - assert transformer2Ws.size() == expected.transformer2Ws.size() - assert transformer2Ws.each {entry -> expected.transformer2Ws.contains({it.uuid == entry.uuid})} - assert transformer3Ws.size() == expected.transformer3Ws.size() - assert transformer3Ws.each {entry -> expected.transformer3Ws.contains({it.uuid == entry.uuid})} - assert switches.size() == expected.switches.size() - assert switches.each {entry -> expected.switches.contains({it.uuid == entry.uuid})} - assert measurementUnits.size() == expected.measurementUnits.size() - assert measurementUnits.each {entry -> expected.measurementUnits.contains({it.uuid == entry.uuid})} + nodes.size() == expected.nodes.size() + nodes.each {entry -> expected.nodes.contains({it.uuid == entry.uuid})} + lines.size() == expected.lines.size() + lines.each {entry -> expected.lines.contains({it.uuid == entry.uuid})} + transformer2Ws.size() == expected.transformer2Ws.size() + transformer2Ws.each {entry -> expected.transformer2Ws.contains({it.uuid == entry.uuid})} + transformer3Ws.size() == expected.transformer3Ws.size() + transformer3Ws.each {entry -> expected.transformer3Ws.contains({it.uuid == entry.uuid})} + switches.size() == expected.switches.size() + switches.each {entry -> expected.switches.contains({it.uuid == entry.uuid})} + measurementUnits.size() == expected.measurementUnits.size() + measurementUnits.each {entry -> expected.measurementUnits.contains({it.uuid == entry.uuid})} } } diff --git a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalGridSourceTest.groovy b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalGridSourceTest.groovy index ce8b3c7a7..3bbac9c2c 100644 --- a/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalGridSourceTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/io/source/csv/CsvThermalGridSourceTest.groovy @@ -17,9 +17,9 @@ class CsvThermalGridSourceTest extends Specification implements CsvTestDataMeta thermalGrids.size() == 1 thermalGrids.get(0).with { def bus = it.bus() - assert it.houses().every { it.thermalBus == bus } - assert it.heatStorages().every { it.thermalBus == bus } - assert it.domesticHotWaterStorages().every { it.thermalBus == bus } + it.houses().every { it.thermalBus == bus } + it.heatStorages().every { it.thermalBus == bus } + it.domesticHotWaterStorages().every { it.thermalBus == bus } } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/MeasurementUnitInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/MeasurementUnitInputTest.groovy index db8eef692..00ffab20f 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/MeasurementUnitInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/MeasurementUnitInputTest.groovy @@ -20,15 +20,15 @@ class MeasurementUnitInputTest extends Specification { then: alteredUnit.with { - assert uuid == unit.uuid - assert operationTime == unit.operationTime - assert operator == unit.operator - assert id == unit.id - assert node == GridTestData.nodeB - assert !getVMag() - assert !getVAng() - assert !getP() - assert !getQ() + uuid == unit.uuid + operationTime == unit.operationTime + operator == unit.operator + id == unit.id + node == GridTestData.nodeB + !getVMag() + !getVAng() + !getP() + !getQ() } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/NodeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/NodeInputTest.groovy index 87a6f4178..69997f81d 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/NodeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/NodeInputTest.groovy @@ -22,14 +22,14 @@ class NodeInputTest extends Specification { then: alteredUnit.with { - assert uuid == node.uuid - assert operationTime == node.operationTime - assert operator == GridTestData.profBroccoli - assert id == "node_B_copy" - assert vTarget == node.getvTarget() - assert slack - assert subnet == 1 - assert voltLvl == GermanVoltageLevelUtils.EHV_220KV + uuid == node.uuid + operationTime == node.operationTime + operator == GridTestData.profBroccoli + id == "node_B_copy" + vTarget == node.getvTarget() + slack + subnet == 1 + voltLvl == GermanVoltageLevelUtils.EHV_220KV } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/OperatorInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/OperatorInputTest.groovy index 5abe90ebd..d1bb86582 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/OperatorInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/OperatorInputTest.groovy @@ -21,8 +21,8 @@ class OperatorInputTest extends Specification { then: alteredUnit.with { - assert uuid == alteredUuid - assert id == "Univ.-Prof. Dr.-Ing. Christian Rehtanz" + uuid == alteredUuid + id == "Univ.-Prof. Dr.-Ing. Christian Rehtanz" } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/connector/LineInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/connector/LineInputTest.groovy index 1a6277d29..70e0982fd 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/connector/LineInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/connector/LineInputTest.groovy @@ -69,13 +69,13 @@ class LineInputTest extends Specification { then: alteredUnit.with { - assert uuid == line.uuid - assert operationTime == line.operationTime - assert operator == GridTestData.profBroccoli - assert id == "line_A_C" - assert nodeA == GridTestData.nodeA - assert nodeB == GridTestData.nodeC - assert length == Quantities.getQuantity(10, Units.METRE) + uuid == line.uuid + operationTime == line.operationTime + operator == GridTestData.profBroccoli + id == "line_A_C" + nodeA == GridTestData.nodeA + nodeB == GridTestData.nodeC + length == Quantities.getQuantity(10, Units.METRE) } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/connector/SwitchInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/connector/SwitchInputTest.groovy index c12638fb9..179b3271d 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/connector/SwitchInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/connector/SwitchInputTest.groovy @@ -22,11 +22,11 @@ class SwitchInputTest extends Specification { then: alteredUnit.with { - assert uuid == switchInput.uuid - assert operationTime == switchInput.operationTime - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == "switch_A_C" - assert !closed + uuid == switchInput.uuid + operationTime == switchInput.operationTime + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == "switch_A_C" + !closed } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/connector/Transformer2WInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/connector/Transformer2WInputTest.groovy index e4859d626..faa7e05db 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/connector/Transformer2WInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/connector/Transformer2WInputTest.groovy @@ -22,15 +22,15 @@ class Transformer2WInputTest extends Specification { then: alteredUnit.with { - assert uuid == trafo2w.uuid - assert operationTime == trafo2w.operationTime - assert operator == OperatorInput.NO_OPERATOR_ASSIGNED - assert id == "trafo2w" - assert nodeA == GridTestData.nodeA - assert nodeB == GridTestData.nodeB - assert type == GridTestData.transformerTypeBtoD - assert tapPos == 10 - assert !autoTap + uuid == trafo2w.uuid + operationTime == trafo2w.operationTime + operator == OperatorInput.NO_OPERATOR_ASSIGNED + id == "trafo2w" + nodeA == GridTestData.nodeA + nodeB == GridTestData.nodeB + type == GridTestData.transformerTypeBtoD + tapPos == 10 + !autoTap } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/connector/Transformer3WInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/connector/Transformer3WInputTest.groovy index 7b8878b71..4485a65af 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/connector/Transformer3WInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/connector/Transformer3WInputTest.groovy @@ -21,16 +21,16 @@ class Transformer3WInputTest extends Specification { then: alteredUnit.with { - assert uuid == trafo3w.uuid - assert operationTime == trafo3w.operationTime - assert operator == GridTestData.profBroccoli - assert id == "trafo3w" - assert nodeA == GridTestData.nodeC - assert nodeB == GridTestData.nodeD - assert nodeC == GridTestData.nodeE - assert type == GridTestData.transformerTypeAtoBtoC - assert tapPos == 10 - assert !autoTap + uuid == trafo3w.uuid + operationTime == trafo3w.operationTime + operator == GridTestData.profBroccoli + id == "trafo3w" + nodeA == GridTestData.nodeC + nodeB == GridTestData.nodeD + nodeC == GridTestData.nodeE + type == GridTestData.transformerTypeAtoBtoC + tapPos == 10 + !autoTap } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/graphics/LineGraphicInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/graphics/LineGraphicInputTest.groovy index b9e108c6f..8cbe6e8ab 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/graphics/LineGraphicInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/graphics/LineGraphicInputTest.groovy @@ -21,10 +21,10 @@ class LineGraphicInputTest extends Specification { then: alteredUnit.with { - assert uuid == lineGraphic.uuid - assert graphicLayer == "second" - assert path == lineGraphic.path - assert line == GridTestData.lineAtoB + uuid == lineGraphic.uuid + graphicLayer == "second" + path == lineGraphic.path + line == GridTestData.lineAtoB } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/graphics/NodeGraphicInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/graphics/NodeGraphicInputTest.groovy index 34509da0d..0a77467a3 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/graphics/NodeGraphicInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/graphics/NodeGraphicInputTest.groovy @@ -20,10 +20,10 @@ class NodeGraphicInputTest extends Specification { then: alteredUnit.with { - assert uuid == nodeGraphic.uuid - assert graphicLayer == "second" - assert path == null - assert node == GridTestData.nodeG + uuid == nodeGraphic.uuid + graphicLayer == "second" + path == null + node == GridTestData.nodeG } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/BmInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/BmInputTest.groovy index 3b5d5182e..ae0cdd3b2 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/BmInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/BmInputTest.groovy @@ -24,16 +24,16 @@ class BmInputTest extends Specification { then: alteredUnit.with { - assert uuid == bmInput.uuid - assert operationTime == bmInput.operationTime - assert operator == bmInput.operator - assert id == bmInput.id - assert marketReaction - assert costControlled - assert qCharacteristics == bmInput.qCharacteristics - assert feedInTariff == Quantities.getQuantity(15, EURO_PER_MEGAWATTHOUR) - assert type == SystemParticipantTestData.bmTypeInput - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == bmInput.uuid + operationTime == bmInput.operationTime + operator == bmInput.operator + id == bmInput.id + marketReaction + costControlled + qCharacteristics == bmInput.qCharacteristics + feedInTariff == Quantities.getQuantity(15, EURO_PER_MEGAWATTHOUR) + type == SystemParticipantTestData.bmTypeInput + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -46,17 +46,17 @@ class BmInputTest extends Specification { then: alteredUnit.with { - assert uuid == bmInput.uuid - assert operationTime == bmInput.operationTime - assert operator == bmInput.operator - assert id == bmInput.id - assert marketReaction == bmInput.marketReaction - assert costControlled == bmInput.costControlled - assert qCharacteristics == bmInput.qCharacteristics - assert feedInTariff == bmInput.feedInTariff - assert type.sRated == bmInput.type.sRated * 2d - assert sRated() == bmInput.type.sRated * 2d - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == bmInput.uuid + operationTime == bmInput.operationTime + operator == bmInput.operator + id == bmInput.id + marketReaction == bmInput.marketReaction + costControlled == bmInput.costControlled + qCharacteristics == bmInput.qCharacteristics + feedInTariff == bmInput.feedInTariff + type.sRated == bmInput.type.sRated * 2d + sRated() == bmInput.type.sRated * 2d + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/ChpInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/ChpInputTest.groovy index b1f8d2cce..e3d6809cd 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/ChpInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/ChpInputTest.groovy @@ -20,16 +20,16 @@ class ChpInputTest extends Specification { then: alteredUnit.with { - assert uuid == chpInput.uuid - assert operationTime == chpInput.operationTime - assert operator == chpInput.operator - assert id == chpInput.id - assert qCharacteristics == chpInput.qCharacteristics - assert thermalBus == SystemParticipantTestData.thermalBus - assert thermalStorage == SystemParticipantTestData.thermalStorage - assert marketReaction - assert type == SystemParticipantTestData.chpTypeInput - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == chpInput.uuid + operationTime == chpInput.operationTime + operator == chpInput.operator + id == chpInput.id + qCharacteristics == chpInput.qCharacteristics + thermalBus == SystemParticipantTestData.thermalBus + thermalStorage == SystemParticipantTestData.thermalStorage + marketReaction + type == SystemParticipantTestData.chpTypeInput + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -42,19 +42,19 @@ class ChpInputTest extends Specification { then: alteredUnit.with { - assert uuid == chpInput.uuid - assert operationTime == chpInput.operationTime - assert operator == chpInput.operator - assert id == chpInput.id - assert qCharacteristics == chpInput.qCharacteristics - assert thermalBus == chpInput.thermalBus - assert thermalStorage == chpInput.thermalStorage - assert marketReaction == chpInput.marketReaction - assert type.sRated == chpInput.type.sRated * 2d - assert sRated() == chpInput.type.sRated * 2d - assert type.pThermal == chpInput.type.pThermal * 2d - assert type.pOwn == chpInput.type.pOwn * 2d - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == chpInput.uuid + operationTime == chpInput.operationTime + operator == chpInput.operator + id == chpInput.id + qCharacteristics == chpInput.qCharacteristics + thermalBus == chpInput.thermalBus + thermalStorage == chpInput.thermalStorage + marketReaction == chpInput.marketReaction + type.sRated == chpInput.type.sRated * 2d + sRated() == chpInput.type.sRated * 2d + type.pThermal == chpInput.type.pThermal * 2d + type.pOwn == chpInput.type.pOwn * 2d + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/EmInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/EmInputTest.groovy index a3a162da1..a5367fff7 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/EmInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/EmInputTest.groovy @@ -22,9 +22,9 @@ class EmInputTest extends Specification { then: emInput.with { - assert uuid == UUID.fromString("977157f4-25e5-4c72-bf34-440edc778792") - assert id == "test_emInput" - assert controlStrategy == SystemParticipantTestData.emControlStrategy + uuid == UUID.fromString("977157f4-25e5-4c72-bf34-440edc778792") + id == "test_emInput" + controlStrategy == SystemParticipantTestData.emControlStrategy } } @@ -81,12 +81,12 @@ class EmInputTest extends Specification { then: alteredUnit.with { - assert uuid == emInput.uuid - assert operationTime == emInput.operationTime - assert operator == emInput.operator - assert id == emInput.id - assert controlStrategy == newStrat - assert controllingEm == Optional.of(givenParentEm) + uuid == emInput.uuid + operationTime == emInput.operationTime + operator == emInput.operator + id == emInput.id + controlStrategy == newStrat + controllingEm == Optional.of(givenParentEm) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/EvInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/EvInputTest.groovy index 3238caf08..eb68b1d3a 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/EvInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/EvInputTest.groovy @@ -20,13 +20,13 @@ class EvInputTest extends Specification { then: alteredUnit.with { - assert uuid == ev.uuid - assert operationTime == ev.operationTime - assert operator == ev.operator - assert id == ev.id - assert qCharacteristics == ev.qCharacteristics - assert type == SystemParticipantTestData.evTypeInput - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == ev.uuid + operationTime == ev.operationTime + operator == ev.operator + id == ev.id + qCharacteristics == ev.qCharacteristics + type == SystemParticipantTestData.evTypeInput + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -39,17 +39,17 @@ class EvInputTest extends Specification { then: alteredUnit.with { - assert uuid == ev.uuid - assert operationTime == ev.operationTime - assert operator == ev.operator - assert id == ev.id - assert qCharacteristics == ev.qCharacteristics - assert type.sRated == ev.type.sRated * 2d - assert sRated() == ev.type.sRated * 2d - assert type.sRatedDC == ev.type.sRatedDC * 2d - assert type.eStorage == ev.type.eStorage * 2d - assert type.eCons == ev.type.eCons * 2d - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == ev.uuid + operationTime == ev.operationTime + operator == ev.operator + id == ev.id + qCharacteristics == ev.qCharacteristics + type.sRated == ev.type.sRated * 2d + sRated() == ev.type.sRated * 2d + type.sRatedDC == ev.type.sRatedDC * 2d + type.eStorage == ev.type.eStorage * 2d + type.eCons == ev.type.eCons * 2d + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/EvcsInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/EvcsInputTest.groovy index 064d98f29..968e8b47b 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/EvcsInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/EvcsInputTest.groovy @@ -26,17 +26,17 @@ class EvcsInputTest extends Specification { then: alteredEntity.with { - assert uuid == evcsInput.uuid - assert operationTime == evcsInput.operationTime - assert operator == evcsInput.operator - assert id == evcsInput.id - assert qCharacteristics == evcsInput.qCharacteristics - assert type == ChargingPointTypeUtils.TeslaSuperChargerV3 - assert cosPhiRated == 0.7d - assert chargingPoints == 1 - assert locationType == EvcsLocationType.CHARGING_HUB_HIGHWAY - assert v2gSupport - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == evcsInput.uuid + operationTime == evcsInput.operationTime + operator == evcsInput.operator + id == evcsInput.id + qCharacteristics == evcsInput.qCharacteristics + type == ChargingPointTypeUtils.TeslaSuperChargerV3 + cosPhiRated == 0.7d + chargingPoints == 1 + locationType == EvcsLocationType.CHARGING_HUB_HIGHWAY + v2gSupport + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -49,18 +49,18 @@ class EvcsInputTest extends Specification { then: alteredUnit.with { - assert uuid == evcsInput.uuid - assert operationTime == evcsInput.operationTime - assert operator == evcsInput.operator - assert id == evcsInput.id - assert qCharacteristics == evcsInput.qCharacteristics - assert type.sRated == evcsInput.type.sRated * 2d - assert sRated() == evcsInput.type.sRated * 2d - assert cosPhiRated == evcsInput.cosPhiRated - assert chargingPoints == evcsInput.chargingPoints - assert locationType == evcsInput.locationType - assert v2gSupport == evcsInput.v2gSupport - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == evcsInput.uuid + operationTime == evcsInput.operationTime + operator == evcsInput.operator + id == evcsInput.id + qCharacteristics == evcsInput.qCharacteristics + type.sRated == evcsInput.type.sRated * 2d + sRated() == evcsInput.type.sRated * 2d + cosPhiRated == evcsInput.cosPhiRated + chargingPoints == evcsInput.chargingPoints + locationType == evcsInput.locationType + v2gSupport == evcsInput.v2gSupport + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/FixedFeedInInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/FixedFeedInInputTest.groovy index 528adeab4..78e9cf970 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/FixedFeedInInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/FixedFeedInInputTest.groovy @@ -22,14 +22,14 @@ class FixedFeedInInputTest extends Specification { then: alteredUnit.with { - assert uuid == ffIn.uuid - assert operationTime == ffIn.operationTime - assert operator == ffIn.operator - assert id == ffIn.id - assert qCharacteristics == ffIn.qCharacteristics - assert sRated == Quantities.getQuantity(10d, PowerSystemUnits.VOLTAMPERE) - assert cosPhiRated == 0.8d - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == ffIn.uuid + operationTime == ffIn.operationTime + operator == ffIn.operator + id == ffIn.id + qCharacteristics == ffIn.qCharacteristics + sRated == Quantities.getQuantity(10d, PowerSystemUnits.VOLTAMPERE) + cosPhiRated == 0.8d + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -42,14 +42,14 @@ class FixedFeedInInputTest extends Specification { then: alteredUnit.with { - assert uuid == ffIn.uuid - assert operationTime == ffIn.operationTime - assert operator == ffIn.operator - assert id == ffIn.id - assert qCharacteristics == ffIn.qCharacteristics - assert sRated == ffIn.sRated * 2d - assert cosPhiRated == ffIn.cosPhiRated - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == ffIn.uuid + operationTime == ffIn.operationTime + operator == ffIn.operator + id == ffIn.id + qCharacteristics == ffIn.qCharacteristics + sRated == ffIn.sRated * 2d + cosPhiRated == ffIn.cosPhiRated + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/HpInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/HpInputTest.groovy index 7a059c9db..dbc2175dc 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/HpInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/HpInputTest.groovy @@ -21,14 +21,14 @@ class HpInputTest extends Specification { then: alteredUnit.with { - assert uuid == hpInput.uuid - assert operationTime == hpInput.operationTime - assert operator == hpInput.operator - assert id == hpInput.id - assert qCharacteristics == hpInput.qCharacteristics - assert thermalBus == SystemParticipantTestData.thermalBus - assert type == SystemParticipantTestData.hpTypeInput - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == hpInput.uuid + operationTime == hpInput.operationTime + operator == hpInput.operator + id == hpInput.id + qCharacteristics == hpInput.qCharacteristics + thermalBus == SystemParticipantTestData.thermalBus + type == SystemParticipantTestData.hpTypeInput + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -41,16 +41,16 @@ class HpInputTest extends Specification { then: alteredUnit.with { - assert uuid == hpInput.uuid - assert operationTime == hpInput.operationTime - assert operator == hpInput.operator - assert id == hpInput.id - assert qCharacteristics == hpInput.qCharacteristics - assert thermalBus == hpInput.thermalBus - assert type.sRated == hpInput.type.sRated * 2d - assert sRated() == hpInput.type.sRated * 2d - assert type.pThermal == hpInput.type.pThermal * 2d - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == hpInput.uuid + operationTime == hpInput.operationTime + operator == hpInput.operator + id == hpInput.id + qCharacteristics == hpInput.qCharacteristics + thermalBus == hpInput.thermalBus + type.sRated == hpInput.type.sRated * 2d + sRated() == hpInput.type.sRated * 2d + type.pThermal == hpInput.type.pThermal * 2d + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/LoadInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/LoadInputTest.groovy index 8694431b0..4659161c2 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/LoadInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/LoadInputTest.groovy @@ -30,17 +30,17 @@ class LoadInputTest extends Specification { then: alteredUnit.with { - assert uuid == loadInput.uuid - assert operationTime == loadInput.operationTime - assert operator == loadInput.operator - assert id == loadInput.id - assert loadProfile == BdewStandardLoadProfile.G0 - assert node == GridTestData.nodeG - assert qCharacteristics == CosPhiFixed.CONSTANT_CHARACTERISTIC - assert eConsAnnual == Quantities.getQuantity(6000, KILOWATTHOUR) - assert sRated == Quantities.getQuantity(0d, KILOVOLTAMPERE) - assert cosPhiRated == 0.8d - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == loadInput.uuid + operationTime == loadInput.operationTime + operator == loadInput.operator + id == loadInput.id + loadProfile == BdewStandardLoadProfile.G0 + node == GridTestData.nodeG + qCharacteristics == CosPhiFixed.CONSTANT_CHARACTERISTIC + eConsAnnual == Quantities.getQuantity(6000, KILOWATTHOUR) + sRated == Quantities.getQuantity(0d, KILOVOLTAMPERE) + cosPhiRated == 0.8d + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -53,17 +53,17 @@ class LoadInputTest extends Specification { then: alteredUnit.with { - assert uuid == loadInput.uuid - assert operationTime == loadInput.operationTime - assert operator == loadInput.operator - assert id == loadInput.id - assert loadProfile == loadInput.loadProfile - assert node == loadInput.node - assert qCharacteristics == loadInput.qCharacteristics - assert eConsAnnual == loadInput.eConsAnnual * 2d - assert sRated == loadInput.sRated * 2d - assert cosPhiRated == loadInput.cosPhiRated - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == loadInput.uuid + operationTime == loadInput.operationTime + operator == loadInput.operator + id == loadInput.id + loadProfile == loadInput.loadProfile + node == loadInput.node + qCharacteristics == loadInput.qCharacteristics + eConsAnnual == loadInput.eConsAnnual * 2d + sRated == loadInput.sRated * 2d + cosPhiRated == loadInput.cosPhiRated + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/PvInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/PvInputTest.groovy index c53e76545..1b5eeb290 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/PvInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/PvInputTest.groovy @@ -27,21 +27,21 @@ class PvInputTest extends Specification { then: alteredUnit.with { - assert uuid == pvInput.uuid - assert operationTime == pvInput.operationTime - assert operator == pvInput.operator - assert id == pvInput.id - assert qCharacteristics == pvInput.qCharacteristics - assert sRated == Quantities.getQuantity(0d, KILOVOLTAMPERE) - assert cosPhiRated == 0.7d - assert marketReaction - assert albedo == 10 - assert azimuth == Quantities.getQuantity(10, DEGREE_GEOM) - assert etaConv == Quantities.getQuantity(50, PERCENT) - assert elevationAngle == Quantities.getQuantity(50, DEGREE_GEOM) - assert kG == 10 - assert kT == 5 - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == pvInput.uuid + operationTime == pvInput.operationTime + operator == pvInput.operator + id == pvInput.id + qCharacteristics == pvInput.qCharacteristics + sRated == Quantities.getQuantity(0d, KILOVOLTAMPERE) + cosPhiRated == 0.7d + marketReaction + albedo == 10 + azimuth == Quantities.getQuantity(10, DEGREE_GEOM) + etaConv == Quantities.getQuantity(50, PERCENT) + elevationAngle == Quantities.getQuantity(50, DEGREE_GEOM) + kG == 10 + kT == 5 + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -54,21 +54,21 @@ class PvInputTest extends Specification { then: alteredUnit.with { - assert uuid == pvInput.uuid - assert operationTime == pvInput.operationTime - assert operator == pvInput.operator - assert id == pvInput.id - assert qCharacteristics == pvInput.qCharacteristics - assert sRated == pvInput.sRated * 2d - assert cosPhiRated == pvInput.cosPhiRated - assert marketReaction == pvInput.marketReaction - assert albedo == pvInput.albedo - assert azimuth == pvInput.azimuth - assert etaConv == pvInput.etaConv - assert elevationAngle == pvInput.elevationAngle - assert kG == pvInput.kG - assert kT == pvInput.kT - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == pvInput.uuid + operationTime == pvInput.operationTime + operator == pvInput.operator + id == pvInput.id + qCharacteristics == pvInput.qCharacteristics + sRated == pvInput.sRated * 2d + cosPhiRated == pvInput.cosPhiRated + marketReaction == pvInput.marketReaction + albedo == pvInput.albedo + azimuth == pvInput.azimuth + etaConv == pvInput.etaConv + elevationAngle == pvInput.elevationAngle + kG == pvInput.kG + kT == pvInput.kT + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/StorageInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/StorageInputTest.groovy index d13d5286b..bf8935019 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/StorageInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/StorageInputTest.groovy @@ -20,13 +20,13 @@ class StorageInputTest extends Specification { then: alteredUnit.with { - assert uuid == storageInput.uuid - assert operationTime == storageInput.operationTime - assert operator == storageInput.operator - assert id == storageInput.id - assert qCharacteristics == storageInput.qCharacteristics - assert type == SystemParticipantTestData.storageTypeInput - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == storageInput.uuid + operationTime == storageInput.operationTime + operator == storageInput.operator + id == storageInput.id + qCharacteristics == storageInput.qCharacteristics + type == SystemParticipantTestData.storageTypeInput + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -39,16 +39,16 @@ class StorageInputTest extends Specification { then: alteredUnit.with { - assert uuid == storageInput.uuid - assert operationTime == storageInput.operationTime - assert operator == storageInput.operator - assert id == storageInput.id - assert qCharacteristics == storageInput.qCharacteristics - assert type.sRated == storageInput.type.sRated * 2d - assert sRated() == storageInput.type.sRated * 2d - assert type.eStorage == storageInput.type.eStorage * 2d - assert type.pMax == storageInput.type.pMax * 2d - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == storageInput.uuid + operationTime == storageInput.operationTime + operator == storageInput.operator + id == storageInput.id + qCharacteristics == storageInput.qCharacteristics + type.sRated == storageInput.type.sRated * 2d + sRated() == storageInput.type.sRated * 2d + type.eStorage == storageInput.type.eStorage * 2d + type.pMax == storageInput.type.pMax * 2d + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/WecInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/WecInputTest.groovy index 752ce71c9..600ed98ed 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/WecInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/WecInputTest.groovy @@ -20,14 +20,14 @@ class WecInputTest extends Specification { then: alteredUnit.with { - assert uuid == wec.uuid - assert operationTime == wec.operationTime - assert operator == wec.operator - assert id == wec.id - assert qCharacteristics == wec.qCharacteristics - assert type == SystemParticipantTestData.wecType - assert marketReaction - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == wec.uuid + operationTime == wec.operationTime + operator == wec.operator + id == wec.id + qCharacteristics == wec.qCharacteristics + type == SystemParticipantTestData.wecType + marketReaction + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } @@ -40,17 +40,17 @@ class WecInputTest extends Specification { then: alteredUnit.with { - assert uuid == wec.uuid - assert operationTime == wec.operationTime - assert operator == wec.operator - assert id == wec.id - assert qCharacteristics == wec.qCharacteristics - assert type.sRated == wec.type.sRated * 2d - assert sRated() == wec.type.sRated * 2d - assert type.rotorArea == wec.type.rotorArea * 2d - assert type.hubHeight == wec.type.hubHeight - assert marketReaction == wec.marketReaction - assert controllingEm == Optional.of(SystemParticipantTestData.emInput) + uuid == wec.uuid + operationTime == wec.operationTime + operator == wec.operator + id == wec.id + qCharacteristics == wec.qCharacteristics + type.sRated == wec.type.sRated * 2d + sRated() == wec.type.sRated * 2d + type.rotorArea == wec.type.rotorArea * 2d + type.hubHeight == wec.type.hubHeight + marketReaction == wec.marketReaction + controllingEm == Optional.of(SystemParticipantTestData.emInput) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/BmTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/BmTypeInputTest.groovy index 258a9a181..fdb54dad4 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/BmTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/BmTypeInputTest.groovy @@ -28,13 +28,13 @@ class BmTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == bmTypeInput.uuid - assert id == bmTypeInput.id - assert capex == Quantities.getQuantity(110d, CAPEX) - assert opex == Quantities.getQuantity(20d, ENERGY_PRICE) - assert sRated == Quantities.getQuantity(50d, ACTIVE_POWER_IN) - assert cosPhiRated == bmTypeInput.cosPhiRated - assert etaConv == bmTypeInput.etaConv + uuid == bmTypeInput.uuid + id == bmTypeInput.id + capex == Quantities.getQuantity(110d, CAPEX) + opex == Quantities.getQuantity(20d, ENERGY_PRICE) + sRated == Quantities.getQuantity(50d, ACTIVE_POWER_IN) + cosPhiRated == bmTypeInput.cosPhiRated + etaConv == bmTypeInput.etaConv } } @@ -47,13 +47,13 @@ class BmTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == bmTypeInput.uuid - assert id == bmTypeInput.id - assert capex == bmTypeInput.capex * 2d - assert opex == bmTypeInput.opex - assert sRated == bmTypeInput.sRated * 2d - assert cosPhiRated == bmTypeInput.cosPhiRated - assert etaConv == bmTypeInput.etaConv + uuid == bmTypeInput.uuid + id == bmTypeInput.id + capex == bmTypeInput.capex * 2d + opex == bmTypeInput.opex + sRated == bmTypeInput.sRated * 2d + cosPhiRated == bmTypeInput.cosPhiRated + etaConv == bmTypeInput.etaConv } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/ChpTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/ChpTypeInputTest.groovy index 0c43f8c27..7684944c7 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/ChpTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/ChpTypeInputTest.groovy @@ -27,16 +27,16 @@ class ChpTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == chpTypeInput.uuid - assert id == chpTypeInput.id - assert capex == chpTypeInput.capex - assert opex == chpTypeInput.opex - assert etaEl == Quantities.getQuantity(20, EFFICIENCY) - assert etaThermal == chpTypeInput.etaThermal - assert sRated == Quantities.getQuantity(50d, ACTIVE_POWER_IN) - assert cosPhiRated == chpTypeInput.cosPhiRated - assert pThermal == Quantities.getQuantity(15, ACTIVE_POWER_IN) - assert pOwn == chpTypeInput.pOwn + uuid == chpTypeInput.uuid + id == chpTypeInput.id + capex == chpTypeInput.capex + opex == chpTypeInput.opex + etaEl == Quantities.getQuantity(20, EFFICIENCY) + etaThermal == chpTypeInput.etaThermal + sRated == Quantities.getQuantity(50d, ACTIVE_POWER_IN) + cosPhiRated == chpTypeInput.cosPhiRated + pThermal == Quantities.getQuantity(15, ACTIVE_POWER_IN) + pOwn == chpTypeInput.pOwn } } @@ -49,16 +49,16 @@ class ChpTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == chpTypeInput.uuid - assert id == chpTypeInput.id - assert capex == chpTypeInput.capex * 2d - assert opex == chpTypeInput.opex - assert etaEl == chpTypeInput.etaEl - assert etaThermal == chpTypeInput.etaThermal - assert sRated == chpTypeInput.sRated * 2d - assert cosPhiRated == chpTypeInput.cosPhiRated - assert pThermal == chpTypeInput.pThermal * 2d - assert pOwn == chpTypeInput.pOwn * 2d + uuid == chpTypeInput.uuid + id == chpTypeInput.id + capex == chpTypeInput.capex * 2d + opex == chpTypeInput.opex + etaEl == chpTypeInput.etaEl + etaThermal == chpTypeInput.etaThermal + sRated == chpTypeInput.sRated * 2d + cosPhiRated == chpTypeInput.cosPhiRated + pThermal == chpTypeInput.pThermal * 2d + pOwn == chpTypeInput.pOwn * 2d } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/EvTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/EvTypeInputTest.groovy index 3702536f7..3d0023511 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/EvTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/EvTypeInputTest.groovy @@ -24,15 +24,15 @@ class EvTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == evTypeInput.uuid - assert id == evTypeInput.id - assert capex == evTypeInput.capex - assert opex == evTypeInput.opex - assert eStorage == Quantities.getQuantity(150, ENERGY_IN) - assert eCons == evTypeInput.eCons - assert sRated == evTypeInput.sRated - assert sRatedDC == evTypeInput.sRatedDC - assert cosPhiRated == evTypeInput.cosPhiRated + uuid == evTypeInput.uuid + id == evTypeInput.id + capex == evTypeInput.capex + opex == evTypeInput.opex + eStorage == Quantities.getQuantity(150, ENERGY_IN) + eCons == evTypeInput.eCons + sRated == evTypeInput.sRated + sRatedDC == evTypeInput.sRatedDC + cosPhiRated == evTypeInput.cosPhiRated } } @@ -45,15 +45,15 @@ class EvTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == evTypeInput.uuid - assert id == evTypeInput.id - assert capex == evTypeInput.capex * 2d - assert opex == evTypeInput.opex - assert eStorage == evTypeInput.eStorage * 2d - assert eCons == evTypeInput.eCons * 2d - assert sRated == evTypeInput.sRated * 2d - assert sRatedDC == evTypeInput.sRatedDC * 2d - assert cosPhiRated == evTypeInput.cosPhiRated + uuid == evTypeInput.uuid + id == evTypeInput.id + capex == evTypeInput.capex * 2d + opex == evTypeInput.opex + eStorage == evTypeInput.eStorage * 2d + eCons == evTypeInput.eCons * 2d + sRated == evTypeInput.sRated * 2d + sRatedDC == evTypeInput.sRatedDC * 2d + cosPhiRated == evTypeInput.cosPhiRated } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/HpTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/HpTypeInputTest.groovy index 01fb1513d..db63841f5 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/HpTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/HpTypeInputTest.groovy @@ -25,13 +25,13 @@ class HpTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == hpTypeInput.uuid - assert id == hpTypeInput.id - assert capex == hpTypeInput.capex - assert opex == hpTypeInput.opex - assert sRated == hpTypeInput.sRated - assert cosPhiRated == 0.97d - assert pThermal == Quantities.getQuantity(10, ACTIVE_POWER_IN) + uuid == hpTypeInput.uuid + id == hpTypeInput.id + capex == hpTypeInput.capex + opex == hpTypeInput.opex + sRated == hpTypeInput.sRated + cosPhiRated == 0.97d + pThermal == Quantities.getQuantity(10, ACTIVE_POWER_IN) } } @@ -44,13 +44,13 @@ class HpTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == hpTypeInput.uuid - assert id == hpTypeInput.id - assert capex == hpTypeInput.capex * 2d - assert opex == hpTypeInput.opex - assert sRated == hpTypeInput.sRated * 2d - assert cosPhiRated == hpTypeInput.cosPhiRated - assert pThermal == hpTypeInput.pThermal * 2d + uuid == hpTypeInput.uuid + id == hpTypeInput.id + capex == hpTypeInput.capex * 2d + opex == hpTypeInput.opex + sRated == hpTypeInput.sRated * 2d + cosPhiRated == hpTypeInput.cosPhiRated + pThermal == hpTypeInput.pThermal * 2d } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/StorageTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/StorageTypeInputTest.groovy index 4b17f368b..c2df885f1 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/StorageTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/StorageTypeInputTest.groovy @@ -7,7 +7,6 @@ package edu.ie3.datamodel.models.input.system.type import static edu.ie3.datamodel.models.StandardUnits.ACTIVE_POWER_IN import static edu.ie3.datamodel.models.StandardUnits.ENERGY_IN -import static edu.ie3.datamodel.models.StandardUnits.LIFE_TIME import edu.ie3.test.common.SystemParticipantTestData import spock.lang.Specification @@ -27,16 +26,16 @@ class StorageTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == storageTypeInput.uuid - assert id == storageTypeInput.id - assert capex == storageTypeInput.capex - assert opex == storageTypeInput.opex - assert eStorage == Quantities.getQuantity(90, ENERGY_IN) - assert sRated == storageTypeInput.sRated - assert cosPhiRated == storageTypeInput.cosPhiRated - assert pMax == Quantities.getQuantity(15, ACTIVE_POWER_IN) - assert activePowerGradient == storageTypeInput.activePowerGradient - assert eta == storageTypeInput.eta + uuid == storageTypeInput.uuid + id == storageTypeInput.id + capex == storageTypeInput.capex + opex == storageTypeInput.opex + eStorage == Quantities.getQuantity(90, ENERGY_IN) + sRated == storageTypeInput.sRated + cosPhiRated == storageTypeInput.cosPhiRated + pMax == Quantities.getQuantity(15, ACTIVE_POWER_IN) + activePowerGradient == storageTypeInput.activePowerGradient + eta == storageTypeInput.eta } } @@ -49,16 +48,16 @@ class StorageTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == storageTypeInput.uuid - assert id == storageTypeInput.id - assert capex == storageTypeInput.capex * 2d - assert opex == storageTypeInput.opex - assert eStorage == storageTypeInput.eStorage * 2d - assert sRated == storageTypeInput.sRated * 2d - assert cosPhiRated == storageTypeInput.cosPhiRated - assert pMax == storageTypeInput.pMax * 2d - assert activePowerGradient == storageTypeInput.activePowerGradient - assert eta == storageTypeInput.eta + uuid == storageTypeInput.uuid + id == storageTypeInput.id + capex == storageTypeInput.capex * 2d + opex == storageTypeInput.opex + eStorage == storageTypeInput.eStorage * 2d + sRated == storageTypeInput.sRated * 2d + cosPhiRated == storageTypeInput.cosPhiRated + pMax == storageTypeInput.pMax * 2d + activePowerGradient == storageTypeInput.activePowerGradient + eta == storageTypeInput.eta } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/WecTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/WecTypeInputTest.groovy index 5cadc262f..660a22dcc 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/WecTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/WecTypeInputTest.groovy @@ -26,16 +26,16 @@ class WecTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == wecType.uuid - assert id == wecType.id - assert capex == wecType.capex - assert opex == wecType.opex - assert sRated == wecType.sRated - assert cosPhiRated == wecType.cosPhiRated - assert cpCharacteristic == wecType.cpCharacteristic - assert etaConv == wecType.etaConv - assert rotorArea == Quantities.getQuantity(25, ROTOR_AREA) - assert hubHeight == Quantities.getQuantity(180, HUB_HEIGHT) + uuid == wecType.uuid + id == wecType.id + capex == wecType.capex + opex == wecType.opex + sRated == wecType.sRated + cosPhiRated == wecType.cosPhiRated + cpCharacteristic == wecType.cpCharacteristic + etaConv == wecType.etaConv + rotorArea == Quantities.getQuantity(25, ROTOR_AREA) + hubHeight == Quantities.getQuantity(180, HUB_HEIGHT) } } @@ -48,16 +48,16 @@ class WecTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == wecType.uuid - assert id == wecType.id - assert capex == wecType.capex * 2d - assert opex == wecType.opex - assert sRated == wecType.sRated * 2d - assert cosPhiRated == wecType.cosPhiRated - assert cpCharacteristic == wecType.cpCharacteristic - assert etaConv == wecType.etaConv - assert rotorArea == wecType.rotorArea * 2d - assert hubHeight == wecType.hubHeight + uuid == wecType.uuid + id == wecType.id + capex == wecType.capex * 2d + opex == wecType.opex + sRated == wecType.sRated * 2d + cosPhiRated == wecType.cosPhiRated + cpCharacteristic == wecType.cpCharacteristic + etaConv == wecType.etaConv + rotorArea == wecType.rotorArea * 2d + hubHeight == wecType.hubHeight } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeTest.groovy index 32f3969fe..582cfaecc 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/system/type/chargingpoint/ChargingPointTypeTest.groovy @@ -24,10 +24,10 @@ class ChargingPointTypeTest extends Specification { then: alteredUnit.with { - assert id == cpt.id - assert sRated == Quantities.getQuantity(2.4, StandardUnits.S_RATED) - assert electricCurrentType == ElectricCurrentType.DC - assert synonymousIds == cpt.synonymousIds + id == cpt.id + sRated == Quantities.getQuantity(2.4, StandardUnits.S_RATED) + electricCurrentType == ElectricCurrentType.DC + synonymousIds == cpt.synonymousIds } } @@ -40,10 +40,10 @@ class ChargingPointTypeTest extends Specification { then: alteredUnit.with { - assert id == cpt.id - assert sRated == cpt.sRated * 2d - assert electricCurrentType == cpt.electricCurrentType - assert synonymousIds == cpt.synonymousIds + id == cpt.id + sRated == cpt.sRated * 2d + electricCurrentType == cpt.electricCurrentType + synonymousIds == cpt.synonymousIds } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy index 98e147f29..eb6f181b9 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/CylindricalStorageInputTest.groovy @@ -24,15 +24,15 @@ class CylindricalStorageInputTest extends Specification { then: alteredUnit.with { - assert uuid == cylindricalStorageInput.uuid - assert id == cylindricalStorageInput.id - assert operator == cylindricalStorageInput.operator - assert operationTime == cylindricalStorageInput.operationTime - assert thermalBus == cylindricalStorageInput.thermalBus - assert storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl - assert inletTemp == ThermalUnitInputTestData.inletTemp - assert returnTemp == ThermalUnitInputTestData.returnTemp - assert c == ThermalUnitInputTestData.c + uuid == cylindricalStorageInput.uuid + id == cylindricalStorageInput.id + operator == cylindricalStorageInput.operator + operationTime == cylindricalStorageInput.operationTime + thermalBus == cylindricalStorageInput.thermalBus + storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl + inletTemp == ThermalUnitInputTestData.inletTemp + returnTemp == ThermalUnitInputTestData.returnTemp + c == ThermalUnitInputTestData.c } } @@ -45,16 +45,16 @@ class CylindricalStorageInputTest extends Specification { then: alteredUnit.with { - assert uuid == cylindricalStorageInput.uuid - assert id == cylindricalStorageInput.id - assert operator == cylindricalStorageInput.operator - assert operationTime == cylindricalStorageInput.operationTime - assert thermalBus == cylindricalStorageInput.thermalBus - assert storageVolumeLvl == cylindricalStorageInput.storageVolumeLvl * 2d - assert inletTemp == cylindricalStorageInput.inletTemp - assert returnTemp == cylindricalStorageInput.returnTemp - assert c == cylindricalStorageInput.c - assert pThermalMax == cylindricalStorageInput.pThermalMax * 2d + uuid == cylindricalStorageInput.uuid + id == cylindricalStorageInput.id + operator == cylindricalStorageInput.operator + operationTime == cylindricalStorageInput.operationTime + thermalBus == cylindricalStorageInput.thermalBus + storageVolumeLvl == cylindricalStorageInput.storageVolumeLvl * 2d + inletTemp == cylindricalStorageInput.inletTemp + returnTemp == cylindricalStorageInput.returnTemp + c == cylindricalStorageInput.c + pThermalMax == cylindricalStorageInput.pThermalMax * 2d } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/DomesticHotWaterStorageInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/DomesticHotWaterStorageInputTest.groovy index f28864c13..7fd3fdee4 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/DomesticHotWaterStorageInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/DomesticHotWaterStorageInputTest.groovy @@ -24,15 +24,15 @@ class DomesticHotWaterStorageInputTest extends Specification { then: alteredUnit.with { - assert uuid == domesticHotWaterStorageInput.uuid - assert id == domesticHotWaterStorageInput.id - assert operator == domesticHotWaterStorageInput.operator - assert operationTime == domesticHotWaterStorageInput.operationTime - assert thermalBus == domesticHotWaterStorageInput.thermalBus - assert storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl - assert inletTemp == ThermalUnitInputTestData.inletTemp - assert returnTemp == ThermalUnitInputTestData.returnTemp - assert c == ThermalUnitInputTestData.c + uuid == domesticHotWaterStorageInput.uuid + id == domesticHotWaterStorageInput.id + operator == domesticHotWaterStorageInput.operator + operationTime == domesticHotWaterStorageInput.operationTime + thermalBus == domesticHotWaterStorageInput.thermalBus + storageVolumeLvl == ThermalUnitInputTestData.storageVolumeLvl + inletTemp == ThermalUnitInputTestData.inletTemp + returnTemp == ThermalUnitInputTestData.returnTemp + c == ThermalUnitInputTestData.c } } @@ -45,16 +45,16 @@ class DomesticHotWaterStorageInputTest extends Specification { then: alteredUnit.with { - assert uuid == domesticHotWaterStorageInput.uuid - assert id == domesticHotWaterStorageInput.id - assert operator == domesticHotWaterStorageInput.operator - assert operationTime == domesticHotWaterStorageInput.operationTime - assert thermalBus == domesticHotWaterStorageInput.thermalBus - assert storageVolumeLvl == domesticHotWaterStorageInput.storageVolumeLvl * 2d - assert inletTemp == domesticHotWaterStorageInput.inletTemp - assert returnTemp == domesticHotWaterStorageInput.returnTemp - assert c == domesticHotWaterStorageInput.c - assert pThermalMax == domesticHotWaterStorageInput.pThermalMax * 2d + uuid == domesticHotWaterStorageInput.uuid + id == domesticHotWaterStorageInput.id + operator == domesticHotWaterStorageInput.operator + operationTime == domesticHotWaterStorageInput.operationTime + thermalBus == domesticHotWaterStorageInput.thermalBus + storageVolumeLvl == domesticHotWaterStorageInput.storageVolumeLvl * 2d + inletTemp == domesticHotWaterStorageInput.inletTemp + returnTemp == domesticHotWaterStorageInput.returnTemp + c == domesticHotWaterStorageInput.c + pThermalMax == domesticHotWaterStorageInput.pThermalMax * 2d } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalBusInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalBusInputTest.groovy index 5ad3ee16f..e63decc19 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalBusInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalBusInputTest.groovy @@ -21,10 +21,10 @@ class ThermalBusInputTest extends Specification { then: alteredUnit.with { - assert uuid == thermalBusInput.uuid - assert id == thermalBusInput.id - assert operator == thermalBusInput.operator - assert operationTime == thermalBusInput.operationTime + uuid == thermalBusInput.uuid + id == thermalBusInput.id + operator == thermalBusInput.operator + operationTime == thermalBusInput.operationTime } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy index 739e8c1d6..12cdaec35 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/input/thermal/ThermalHouseInputTest.groovy @@ -28,18 +28,18 @@ class ThermalHouseInputTest extends Specification { then: alteredUnit.with { - assert uuid == thermalHouseInput.uuid - assert id == thermalHouseInput.id - assert operator == thermalHouseInput.operator - assert operationTime == thermalHouseInput.operationTime - assert thermalBus == thermalHouseInput.thermalBus - assert ethLosses == ThermalUnitInputTestData.thermalConductance - assert ethCapa == ThermalUnitInputTestData.ethCapa - assert targetTemperature == ThermalUnitInputTestData.TARGET_TEMPERATURE - assert upperTemperatureLimit == ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT - assert lowerTemperatureLimit == ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT - assert housingType == ThermalUnitInputTestData.HOUSING_TYPE - assert numberOfInhabitants == ThermalUnitInputTestData.NUMBER_INHABITANTS + uuid == thermalHouseInput.uuid + id == thermalHouseInput.id + operator == thermalHouseInput.operator + operationTime == thermalHouseInput.operationTime + thermalBus == thermalHouseInput.thermalBus + ethLosses == ThermalUnitInputTestData.thermalConductance + ethCapa == ThermalUnitInputTestData.ethCapa + targetTemperature == ThermalUnitInputTestData.TARGET_TEMPERATURE + upperTemperatureLimit == ThermalUnitInputTestData.UPPER_TEMPERATURE_LIMIT + lowerTemperatureLimit == ThermalUnitInputTestData.LOWER_TEMPERATURE_LIMIT + housingType == ThermalUnitInputTestData.HOUSING_TYPE + numberOfInhabitants == ThermalUnitInputTestData.NUMBER_INHABITANTS } } @@ -53,10 +53,10 @@ class ThermalHouseInputTest extends Specification { def otherObject = "otherObject" expect: - thermalHouseInput1.equals(thermalHouseInput2) - !thermalHouseInput1.equals(null) - !thermalHouseInput1.equals(thermalHouseInput3) - !thermalHouseInput1.equals(otherObject) + Objects.equals(thermalHouseInput1, thermalHouseInput2) + !Objects.equals(thermalHouseInput1, null) + !Objects.equals(thermalHouseInput1, thermalHouseInput3) + !Objects.equals(thermalHouseInput1, otherObject) } def "A ThermalHouseInput without operator and operation time is created as expected"() { @@ -91,18 +91,18 @@ class ThermalHouseInputTest extends Specification { then: alteredUnit.with { - assert uuid == thermalHouseInput.uuid - assert id == thermalHouseInput.id - assert operator == thermalHouseInput.operator - assert operationTime == thermalHouseInput.operationTime - assert thermalBus == thermalHouseInput.thermalBus - assert ethLosses == thermalHouseInput.ethLosses * 2d - assert ethCapa == thermalHouseInput.ethCapa * 2d - assert targetTemperature == thermalHouseInput.targetTemperature - assert upperTemperatureLimit == thermalHouseInput.upperTemperatureLimit - assert lowerTemperatureLimit == thermalHouseInput.lowerTemperatureLimit - assert housingType == thermalHouseInput.housingType - assert numberOfInhabitants == thermalHouseInput.numberOfInhabitants * 2d + uuid == thermalHouseInput.uuid + id == thermalHouseInput.id + operator == thermalHouseInput.operator + operationTime == thermalHouseInput.operationTime + thermalBus == thermalHouseInput.thermalBus + ethLosses == thermalHouseInput.ethLosses * 2d + ethCapa == thermalHouseInput.ethCapa * 2d + targetTemperature == thermalHouseInput.targetTemperature + upperTemperatureLimit == thermalHouseInput.upperTemperatureLimit + lowerTemperatureLimit == thermalHouseInput.lowerTemperatureLimit + housingType == thermalHouseInput.housingType + numberOfInhabitants == thermalHouseInput.numberOfInhabitants * 2d } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/typeInput/LineTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/typeInput/LineTypeInputTest.groovy index a8ba2964c..3fed9d536 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/typeInput/LineTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/typeInput/LineTypeInputTest.groovy @@ -31,14 +31,14 @@ class LineTypeInputTest extends Specification { then: alteredUnit.with { - assert uuid == lineTypeInput.uuid - assert id == "lineTypeInput_copy" - assert b == Quantities.getQuantity(0.1d, PowerSystemUnits.MICRO_SIEMENS_PER_KILOMETRE) - assert g == Quantities.getQuantity(0.1d, PowerSystemUnits.MICRO_SIEMENS_PER_KILOMETRE) - assert r == Quantities.getQuantity(0.5d, PowerSystemUnits.OHM_PER_KILOMETRE) - assert x == Quantities.getQuantity(0.4d, PowerSystemUnits.OHM_PER_KILOMETRE) - assert iMax == Quantities.getQuantity(310d, Units.AMPERE) - assert vRated == Quantities.getQuantity(30d, Units.VOLT) + uuid == lineTypeInput.uuid + id == "lineTypeInput_copy" + b == Quantities.getQuantity(0.1d, PowerSystemUnits.MICRO_SIEMENS_PER_KILOMETRE) + g == Quantities.getQuantity(0.1d, PowerSystemUnits.MICRO_SIEMENS_PER_KILOMETRE) + r == Quantities.getQuantity(0.5d, PowerSystemUnits.OHM_PER_KILOMETRE) + x == Quantities.getQuantity(0.4d, PowerSystemUnits.OHM_PER_KILOMETRE) + iMax == Quantities.getQuantity(310d, Units.AMPERE) + vRated == Quantities.getQuantity(30d, Units.VOLT) } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/typeInput/Transformer2WTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/typeInput/Transformer2WTypeInputTest.groovy index eed815823..4b2bd0909 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/typeInput/Transformer2WTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/typeInput/Transformer2WTypeInputTest.groovy @@ -37,21 +37,21 @@ class Transformer2WTypeInputTest extends Specification{ then: alteredUnit.with { - assert uuid == transformer2WTypeInput.uuid - assert id == "transformer2WTypeInput_copy" - assert rSc == Quantities.getQuantity(1, Units.OHM) - assert xSc == Quantities.getQuantity(52, Units.OHM) - assert sRated == Quantities.getQuantity(50000, PowerSystemUnits.KILOWATT) - assert vRatedA == Quantities.getQuantity(111, PowerSystemUnits.KILOVOLT) - assert vRatedB == Quantities.getQuantity(11, PowerSystemUnits.KILOVOLT) - assert gM == Quantities.getQuantity(1, PowerSystemUnits.NANOSIEMENS) - assert bM == Quantities.getQuantity(1, PowerSystemUnits.NANOSIEMENS) - assert dV == Quantities.getQuantity(2, PowerSystemUnits.PERCENT) - assert dPhi == Quantities.getQuantity(1, PowerSystemUnits.DEGREE_GEOM) - assert tapSide - assert tapNeutr == 11 - assert tapMin == 2 - assert tapMax == 20 + uuid == transformer2WTypeInput.uuid + id == "transformer2WTypeInput_copy" + rSc == Quantities.getQuantity(1, Units.OHM) + xSc == Quantities.getQuantity(52, Units.OHM) + sRated == Quantities.getQuantity(50000, PowerSystemUnits.KILOWATT) + vRatedA == Quantities.getQuantity(111, PowerSystemUnits.KILOVOLT) + vRatedB == Quantities.getQuantity(11, PowerSystemUnits.KILOVOLT) + gM == Quantities.getQuantity(1, PowerSystemUnits.NANOSIEMENS) + bM == Quantities.getQuantity(1, PowerSystemUnits.NANOSIEMENS) + dV == Quantities.getQuantity(2, PowerSystemUnits.PERCENT) + dPhi == Quantities.getQuantity(1, PowerSystemUnits.DEGREE_GEOM) + tapSide + tapNeutr == 11 + tapMin == 2 + tapMax == 20 } } } diff --git a/src/test/groovy/edu/ie3/datamodel/models/typeInput/Transformer3WTypeInputTest.groovy b/src/test/groovy/edu/ie3/datamodel/models/typeInput/Transformer3WTypeInputTest.groovy index 9537e3c22..2d4a82be4 100644 --- a/src/test/groovy/edu/ie3/datamodel/models/typeInput/Transformer3WTypeInputTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/models/typeInput/Transformer3WTypeInputTest.groovy @@ -43,27 +43,27 @@ class Transformer3WTypeInputTest extends Specification{ then: alteredUnit.with { - assert uuid == transformer3WTypeInput.uuid - assert id == "transformer3WTypeInput_copy" - assert rScA == Quantities.getQuantity(3, Units.OHM) - assert rScB == Quantities.getQuantity(2, Units.OHM) - assert rScC == Quantities.getQuantity(1, Units.OHM) - assert xScA == Quantities.getQuantity(3, Units.OHM) - assert xScB == Quantities.getQuantity(2, Units.OHM) - assert xScC == Quantities.getQuantity(1, Units.OHM) - assert sRatedA == Quantities.getQuantity(100000, PowerSystemUnits.KILOWATT) - assert sRatedB == Quantities.getQuantity(70000, PowerSystemUnits.KILOWATT) - assert sRatedC == Quantities.getQuantity(50000, PowerSystemUnits.KILOWATT) - assert vRatedA == Quantities.getQuantity(400, PowerSystemUnits.KILOVOLT) - assert vRatedB == Quantities.getQuantity(120, PowerSystemUnits.KILOVOLT) - assert vRatedC == Quantities.getQuantity(30, PowerSystemUnits.KILOVOLT) - assert gM == Quantities.getQuantity(50000, PowerSystemUnits.NANOSIEMENS) - assert bM == Quantities.getQuantity(-2000, PowerSystemUnits.NANOSIEMENS) - assert dV == Quantities.getQuantity(2, PowerSystemUnits.PERCENT) - assert dPhi == Quantities.getQuantity(1, PowerSystemUnits.DEGREE_GEOM) - assert tapNeutr == 1 - assert tapMin == -11 - assert tapMax == 20 + uuid == transformer3WTypeInput.uuid + id == "transformer3WTypeInput_copy" + rScA == Quantities.getQuantity(3, Units.OHM) + rScB == Quantities.getQuantity(2, Units.OHM) + rScC == Quantities.getQuantity(1, Units.OHM) + xScA == Quantities.getQuantity(3, Units.OHM) + xScB == Quantities.getQuantity(2, Units.OHM) + xScC == Quantities.getQuantity(1, Units.OHM) + sRatedA == Quantities.getQuantity(100000, PowerSystemUnits.KILOWATT) + sRatedB == Quantities.getQuantity(70000, PowerSystemUnits.KILOWATT) + sRatedC == Quantities.getQuantity(50000, PowerSystemUnits.KILOWATT) + vRatedA == Quantities.getQuantity(400, PowerSystemUnits.KILOVOLT) + vRatedB == Quantities.getQuantity(120, PowerSystemUnits.KILOVOLT) + vRatedC == Quantities.getQuantity(30, PowerSystemUnits.KILOVOLT) + gM == Quantities.getQuantity(50000, PowerSystemUnits.NANOSIEMENS) + bM == Quantities.getQuantity(-2000, PowerSystemUnits.NANOSIEMENS) + dV == Quantities.getQuantity(2, PowerSystemUnits.PERCENT) + dPhi == Quantities.getQuantity(1, PowerSystemUnits.DEGREE_GEOM) + tapNeutr == 1 + tapMin == -11 + tapMax == 20 } } } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/ContainerNodeUpdateUtilTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/ContainerNodeUpdateUtilTest.groovy index 4e8421f73..73eeb115f 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/ContainerNodeUpdateUtilTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/ContainerNodeUpdateUtilTest.groovy @@ -40,14 +40,14 @@ class ContainerNodeUpdateUtilTest extends Specification { then: trafoNodeUpdateResult.with { - assert updatedOldToNewNodes.size() == 3 + updatedOldToNewNodes.size() == 3 // all nodes should have the expected geoPosition - assert updatedOldToNewNodes.values().stream().map({ node -> node.geoPosition }).collect(Collectors.toSet()) == Collections.singleton(expectedGeoPosition) + updatedOldToNewNodes.values().stream().map({ node -> node.geoPosition }).collect(Collectors.toSet()) == Collections.singleton(expectedGeoPosition) - assert updatedTransformer2WInputs.size() == 2 + updatedTransformer2WInputs.size() == 2 // transformers nodes should end up to be the updated nodes - assert updatedTransformer2WInputs.stream().flatMap({ trafo2w -> Stream.of(trafo2w.getNodeA(), trafo2w.getNodeB()) }) + updatedTransformer2WInputs.stream().flatMap({ trafo2w -> Stream.of(trafo2w.getNodeA(), trafo2w.getNodeB()) }) .collect(Collectors.toSet()) == updatedOldToNewNodes.values() as Set } @@ -90,15 +90,15 @@ class ContainerNodeUpdateUtilTest extends Specification { then: trafoNodeUpdateResult.with { - assert updatedOldToNewNodes.size() == 3 + updatedOldToNewNodes.size() == 3 // nodeA and nodeD are set to geoPosition of high voltage node of leading transformer (= nodeG geoPosition) - assert updatedOldToNewNodes.get(oldNodeA) == newNodeA.copy().geoPosition(oldNodeG.geoPosition).build() - assert updatedOldToNewNodes.get(oldNodeD) == newNodeD.copy().geoPosition(oldNodeG.geoPosition).build() - assert updatedOldToNewNodes.get(oldNodeG) == oldNodeG + updatedOldToNewNodes.get(oldNodeA) == newNodeA.copy().geoPosition(oldNodeG.geoPosition).build() + updatedOldToNewNodes.get(oldNodeD) == newNodeD.copy().geoPosition(oldNodeG.geoPosition).build() + updatedOldToNewNodes.get(oldNodeG) == oldNodeG - assert updatedTransformer2WInputs.size() == 2 + updatedTransformer2WInputs.size() == 2 // transformer nodes should end up to be the updated nodes - assert updatedTransformer2WInputs.stream().flatMap({ trafo2w -> Stream.of(trafo2w.getNodeA(), trafo2w.getNodeB()) }) + updatedTransformer2WInputs.stream().flatMap({ trafo2w -> Stream.of(trafo2w.getNodeA(), trafo2w.getNodeB()) }) .collect(Collectors.toSet()) == updatedOldToNewNodes.values() as Set } } @@ -121,14 +121,14 @@ class ContainerNodeUpdateUtilTest extends Specification { then: trafoNodeUpdateResult.with { - assert updatedOldToNewNodes.size() == 7 + updatedOldToNewNodes.size() == 7 // all nodes should have the expected geoPosition - assert updatedOldToNewNodes.values().stream().map({ node -> node.geoPosition }).collect(Collectors.toSet()) == Collections.singleton(expectedGeoPosition) + updatedOldToNewNodes.values().stream().map({ node -> node.geoPosition }).collect(Collectors.toSet()) == Collections.singleton(expectedGeoPosition) - assert updatedTransformer2WInputs.size() == 5 + updatedTransformer2WInputs.size() == 5 // transformer nodes should end up to be the updated nodes - assert Stream.of(updatedTransformer2WInputs.stream().flatMap({ trafo2w -> Stream.of(trafo2w.getNodeA(), trafo2w.getNodeB()) }), + Stream.of(updatedTransformer2WInputs.stream().flatMap({ trafo2w -> Stream.of(trafo2w.getNodeA(), trafo2w.getNodeB()) }), updatedTransformer3WInputs.stream().flatMap({ trafo3w -> Stream.of(trafo3w.getNodeA(), trafo3w.getNodeB(), trafo3w.getNodeC()) })).flatMap(Function.identity()) .collect(Collectors.toSet()) == updatedOldToNewNodes.values() as Set } @@ -162,13 +162,13 @@ class ContainerNodeUpdateUtilTest extends Specification { then: trafoNodeUpdateResult.with { - assert updatedOldToNewNodes.size() == 7 + updatedOldToNewNodes.size() == 7 // all nodes should have the expected geoPosition - assert updatedOldToNewNodes.values().stream().map({ node -> node.geoPosition }).collect(Collectors.toSet()) == Collections.singleton(expectedGeoPosition) + updatedOldToNewNodes.values().stream().map({ node -> node.geoPosition }).collect(Collectors.toSet()) == Collections.singleton(expectedGeoPosition) - assert updatedTransformer2WInputs.size() == 5 + updatedTransformer2WInputs.size() == 5 // transformer nodes should end up to be the updated nodes - assert Stream.of(updatedTransformer2WInputs.stream().flatMap({ trafo2w -> Stream.of(trafo2w.getNodeA(), trafo2w.getNodeB()) }), + Stream.of(updatedTransformer2WInputs.stream().flatMap({ trafo2w -> Stream.of(trafo2w.getNodeA(), trafo2w.getNodeB()) }), updatedTransformer3WInputs.stream().flatMap({ trafo3w -> Stream.of(trafo3w.getNodeA(), trafo3w.getNodeB(), trafo3w.getNodeC()) })).flatMap(Function.identity()) .collect(Collectors.toSet()) == updatedOldToNewNodes.values() as Set } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy index b925190b9..7ab698d6a 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/ContainerUtilsTest.groovy @@ -313,7 +313,7 @@ class ContainerUtilsTest extends Specification { SubGridContainer actualSubGrid = entry.value SubGridContainer expectedSubGrid = expectedSubGrids.get(subnetNo) - assert actualSubGrid == expectedSubGrid + actualSubGrid == expectedSubGrid } } @@ -344,38 +344,38 @@ class ContainerUtilsTest extends Specification { SubGridContainer unmodifiedSubGrid = unmodifiedSubGrids.get(it.key) computableSubGrid.with { - assert subnet == unmodifiedSubGrid.subnet - assert predominantVoltageLevel == unmodifiedSubGrid.predominantVoltageLevel + subnet == unmodifiedSubGrid.subnet + predominantVoltageLevel == unmodifiedSubGrid.predominantVoltageLevel // 2 winding transformer hv nodes must be marked as slacks rawGrid.transformer2Ws.each { def trafo2w = it trafo2w.with { - assert nodeA.slack + nodeA.slack } } // all adapted trafo2w nodes must be part of the nodes set - assert rawGrid.nodes.containsAll(rawGrid.transformer2Ws.collect{it.nodeA}) + rawGrid.nodes.containsAll(rawGrid.transformer2Ws.collect{it.nodeA}) // 3 winding transformer slack nodes must be mapped correctly rawGrid.transformer3Ws.each { def trafo3w = it if(trafo3w.nodeA.subnet == subnet) { // subnet 1 is highest grid in test set + trafo 3w -> nodeA must be slack - assert subnet == 1 ? trafo3w.nodeA.slack : !trafo3w.nodeA.slack - assert !trafo3w.nodeInternal.slack - assert rawGrid.nodes.contains(trafo3w.nodeInternal) + subnet == 1 ? trafo3w.nodeA.slack : !trafo3w.nodeA.slack + !trafo3w.nodeInternal.slack + rawGrid.nodes.contains(trafo3w.nodeInternal) } else { - assert trafo3w.nodeInternal.slack - assert !trafo3w.nodeA.slack - assert !trafo3w.nodeB.slack - assert !trafo3w.nodeC.slack - assert rawGrid.nodes.contains(trafo3w.nodeInternal) + trafo3w.nodeInternal.slack + !trafo3w.nodeA.slack + !trafo3w.nodeB.slack + !trafo3w.nodeC.slack + rawGrid.nodes.contains(trafo3w.nodeInternal) } } - assert systemParticipants == unmodifiedSubGrid.systemParticipants + systemParticipants == unmodifiedSubGrid.systemParticipants } } } @@ -466,9 +466,9 @@ class ContainerUtilsTest extends Specification { then: graph.getEdge(nodeA, nodeB).with { - assert weight == 913.5678707610981d - assert source == nodeA - assert target == nodeB + weight == 913.5678707610981d + source == nodeA + target == nodeB } } @@ -530,22 +530,22 @@ class ContainerUtilsTest extends Specification { /* Check impedance of two winding transformer */ graph.getEdge(transformer.nodeA, transformer.nodeB).with { - assert DoubleTestHelper.equalsWithTolerance(weight, 112.33121875062159d, 1E-6) + DoubleTestHelper.equalsWithTolerance(weight, 112.33121875062159d, 1E-6) } /* Check impedance of three winding transformer */ graph.getEdge(transformer3w.nodeA, transformer3w.nodeB).with { - assert DoubleTestHelper.equalsWithTolerance(weight, 1.1278408575681236d, 1E-6) + DoubleTestHelper.equalsWithTolerance(weight, 1.1278408575681236d, 1E-6) } graph.getEdge(transformer3w.nodeA, transformer3w.nodeC).with { - assert DoubleTestHelper.equalsWithTolerance(weight, 1.0471340124358486d, 1E-6) + DoubleTestHelper.equalsWithTolerance(weight, 1.0471340124358486d, 1E-6) } /* Check impedance of line */ graph.getEdge(line.nodeA, line.nodeB).with { - assert DoubleTestHelper.equalsWithTolerance(weight, 0.0016909597866300665d, 1E-6) + DoubleTestHelper.equalsWithTolerance(weight, 0.0016909597866300665d, 1E-6) } /* Check impedance of switch */ graph.getEdge(swtchClosed.nodeA, swtchClosed.nodeB).with { - assert DoubleTestHelper.equalsWithTolerance(weight, 1.0d, 1E-6) + DoubleTestHelper.equalsWithTolerance(weight, 1.0d, 1E-6) } } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/FileUtilsTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/FileUtilsTest.groovy index 36741b050..b0416afbf 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/FileUtilsTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/FileUtilsTest.groovy @@ -41,8 +41,8 @@ class FileUtilsTest extends Specification { then: file.with { - assert it.fileName == Path.of(this.fileName) - assert it == this.directory.resolve(this.fileName) + it.fileName == Path.of(this.fileName) + it == this.directory.resolve(this.fileName) } where: @@ -57,9 +57,9 @@ class FileUtilsTest extends Specification { then: file.with { - assert it.fileName == Path.of(this.fileName) - assert it.relativize(it.fileName) == Path.of("") - assert it.parent == null + it.fileName == Path.of(this.fileName) + it.relativize(it.fileName) == Path.of("") + it.parent == null } } } diff --git a/src/test/groovy/edu/ie3/datamodel/utils/TryTest.groovy b/src/test/groovy/edu/ie3/datamodel/utils/TryTest.groovy index 59909cb14..b197704ca 100644 --- a/src/test/groovy/edu/ie3/datamodel/utils/TryTest.groovy +++ b/src/test/groovy/edu/ie3/datamodel/utils/TryTest.groovy @@ -545,18 +545,18 @@ class TryTest extends Specification { exceptions.size() == 3 exceptions.get(0).with { - assert it.class == SourceException - assert it.message == "source exception" + it.class == SourceException + it.message == "source exception" } exceptions.get(1).with { - assert it.class == UnsupportedOperationException - assert it.message == "unsupported operation exception" + it.class == UnsupportedOperationException + it.message == "unsupported operation exception" } exceptions.get(2).with { - assert it.class == SourceException - assert it.message == "source exception 2" + it.class == SourceException + it.message == "source exception 2" } } }