Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed the issues with rtd for Cylindrical thermal storage [#1273](https://github.com/ie3-institute/PowerSystemDataModel/issues/1273)
- Updated Controlling_em for all the loads in readthedocs[#1447](https://github.com/ie3-institute/PowerSystemDataModel/issues/1447)
- Included a doFirst clause into `checkJavaVersion.gradle` [#1462](https://github.com/ie3-institute/PowerSystemDataModel/issues/1462)
- Fixed `EnergyPriceValue.equals()` [#1479](https://github.com/ie3-institute/PowerSystemDataModel/issues/1479)

### Changed
- Updated CI-Pipeline to run task `Deploy` and `Staging` only for `Main` [#1403](https://github.com/ie3-institute/PowerSystemDataModel/issues/1403)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EnergyPriceValue that = (EnergyPriceValue) o;
return Objects.equals(price, that.price);

return Objects.equals(price.getValue().doubleValue(), that.price.getValue().doubleValue())
&& Objects.equals(price.getUnit(), that.price.getUnit());
}

@Override
public int hashCode() {
return Objects.hash(price);
return Objects.hash(price.getValue().doubleValue(), price.getUnit());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import spock.lang.Shared
import spock.lang.Specification
import tech.units.indriya.quantity.Quantities

import java.time.ZoneId

class TimeBasedSimpleValueFactoryTest extends Specification {
@Shared
TimeUtil defaultTimeUtil
Expand Down Expand Up @@ -110,7 +108,7 @@ class TimeBasedSimpleValueFactoryTest extends Specification {
)

expect:
factory.buildModel(data) == expected
Objects.equals(factory.buildModel(data),expected)
}

def "The simple time based value factory builds correct heat and apparent power value"() {
Expand Down