Skip to content

Commit

Permalink
use should approximate instead of should be and DefaultTestData.
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepetersmeier committed Jul 29, 2024
1 parent 8099836 commit 6adc1b5
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import edu.ie3.simona.model.participant.load.LoadReference.{
ActivePower,
EnergyConsumption,
}
import edu.ie3.simona.test.common.UnitSpec
import edu.ie3.simona.test.common.input.LoadInputTestData
import edu.ie3.util.TimeUtil
import edu.ie3.simona.test.common.{DefaultTestData, UnitSpec}
import edu.ie3.util.quantities.PowerSystemUnits
import org.scalatest.prop.TableDrivenPropertyChecks
import squants.Power
Expand All @@ -24,20 +23,17 @@ import squants.energy.{KilowattHours, Kilowatts, Watts}
class FixedLoadModelSpec
extends UnitSpec
with LoadInputTestData
with DefaultTestData
with TableDrivenPropertyChecks {

private implicit val tolerance: Power = Watts(1d)

"A fixed load model" should {

val simulationStartDate =
TimeUtil.withDefaults.toZonedDateTime("2019-01-01T00:00:00Z")
val simulationEndDate =
TimeUtil.withDefaults.toZonedDateTime("2019-12-31T23:59:00Z")
val foreSeenOperationInterval =
val defaultOperationInterval =
SystemComponent.determineOperationInterval(
simulationStartDate,
simulationEndDate,
defaultSimulationStart,
defaultSimulationEnd,
loadInput.getOperationTime,
)

Expand All @@ -52,7 +48,7 @@ class FixedLoadModelSpec
val actual = new FixedLoadModel(
loadInput.getUuid,
loadInput.getId,
foreSeenOperationInterval,
defaultOperationInterval,
QControl.apply(loadInput.getqCharacteristics),
Kilowatts(
loadInput.getsRated
Expand Down Expand Up @@ -86,7 +82,7 @@ class FixedLoadModelSpec
val dut = new FixedLoadModel(
loadInput.getUuid,
loadInput.getId,
foreSeenOperationInterval,
defaultOperationInterval,
QControl.apply(loadInput.getqCharacteristics),
Kilowatts(
loadInput.getsRated
Expand Down Expand Up @@ -131,7 +127,7 @@ class FixedLoadModelSpec
val dut = new FixedLoadModel(
loadInput.getUuid,
loadInput.getId,
foreSeenOperationInterval,
defaultOperationInterval,
QControl.apply(loadInput.getqCharacteristics),
scaledSRated,
loadInput.getCosPhiRated,
Expand Down

0 comments on commit 6adc1b5

Please sign in to comment.