-
Notifications
You must be signed in to change notification settings - Fork 5
/
ChpInputTest.groovy
34 lines (29 loc) · 1.18 KB
/
ChpInputTest.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* © 2021. TU Dortmund University,
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
* Research group Distribution grid planning and operation
*/
package edu.ie3.datamodel.models.input.system
import edu.ie3.test.common.SystemParticipantTestData
import spock.lang.Specification
class ChpInputTest extends Specification {
def "A ChpInput copy method should work as expected"() {
given:
def chpInput = SystemParticipantTestData.chpInput
when:
def alteredUnit = chpInput.copy().thermalBus(SystemParticipantTestData.thermalBus)
.type(SystemParticipantTestData.chpTypeInput).thermalStorage(SystemParticipantTestData.thermalStorage).marketReaction(true).build()
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
}
}
}