Skip to content

Commit a7e4984

Browse files
fix tests by using Objects.equals()
1 parent 48f50c5 commit a7e4984

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/CosmoTimeBasedWeatherValueFactoryTest.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CosmoTimeBasedWeatherValueFactoryTest extends Specification {
4545
def model = factory.buildModel(data)
4646

4747
then:
48-
model.equals(expectedResults)
48+
Objects.equals(model,expectedResults)
4949
}
5050

5151
def "A PsdmTimeBasedWeatherValueFactory should be able to create time series values"() {
@@ -77,7 +77,7 @@ class CosmoTimeBasedWeatherValueFactoryTest extends Specification {
7777
def model = factory.buildModel(data)
7878

7979
then:
80-
model.equals(expectedResults)
80+
Objects.equals(model,expectedResults)
8181
}
8282

8383
def "A PsdmTimeBasedWeatherValueFactory should throw FactoryException if required field is missing"() {
@@ -133,6 +133,6 @@ class CosmoTimeBasedWeatherValueFactoryTest extends Specification {
133133
def model = factory.buildModel(data)
134134

135135
then:
136-
!model.equals(expectedResults)
136+
!Objects.equals(model,expectedResults)
137137
}
138138
}

src/test/groovy/edu/ie3/datamodel/io/factory/timeseries/TimeBasedSimpleValueFactoryTest.groovy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class TimeBasedSimpleValueFactoryTest extends Specification {
127127
)
128128

129129
expect:
130-
Object.equals(factory.buildModel(data), expected)
130+
Objects.equals(factory.buildModel(data), expected)
131131
}
132132

133133
def "The simple time based value factory builds correct heat and active power value"() {
@@ -145,7 +145,7 @@ class TimeBasedSimpleValueFactoryTest extends Specification {
145145
)
146146

147147
expect:
148-
Object.equals(factory.buildModel(data), expected)
148+
Objects.equals(factory.buildModel(data), expected)
149149
}
150150

151151
def "The simple time based value factory builds correct heat demand value"() {
@@ -162,7 +162,7 @@ class TimeBasedSimpleValueFactoryTest extends Specification {
162162
)
163163

164164
expect:
165-
Object.equals(factory.buildModel(data), expected)
165+
Objects.equals(factory.buildModel(data), expected)
166166
}
167167

168168
def "The simple time based value factory builds correct apparent power value"() {
@@ -180,7 +180,7 @@ class TimeBasedSimpleValueFactoryTest extends Specification {
180180
)
181181

182182
expect:
183-
Object.equals(factory.buildModel(data), expected)
183+
Objects.equals(factory.buildModel(data), expected)
184184
}
185185

186186
def "The simple time based value factory builds correct active power value"() {
@@ -200,7 +200,7 @@ class TimeBasedSimpleValueFactoryTest extends Specification {
200200
def obj = factory.buildModel(data)
201201

202202
expect:
203-
Object.equals(obj, expected)
203+
Objects.equals(obj, expected)
204204
}
205205

206206
def "The simple time based value factory throws a FactoryException upon build request, if a class is not supported"() {

0 commit comments

Comments
 (0)