-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FixedfeedModelSpec-convert-groovy-tests-to-scalatest #832
base: dev
Are you sure you want to change the base?
FixedfeedModelSpec-convert-groovy-tests-to-scalatest #832
Conversation
…vy-tests-to-scalatest
…-convert-groovy-tests-to-scalatest' into pp/#646-FixedFeedModelSpec.scala-convert-groovy-tests-to-scalatest # Conflicts: # CHANGELOG.md
…vy-tests-to-scalatest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also just minor things. Looks very good :)
val fixedFeedInput = new FixedFeedInInput( | ||
UUID.fromString("4eeaf76a-ec17-4fc3-872d-34b7d6004b03"), | ||
"testFixedFeed", | ||
OperatorInput.NO_OPERATOR_ASSIGNED, | ||
OperationTime.notLimited(), | ||
new NodeInput( | ||
UUID.fromString("e5c1cde5-c161-4a4f-997f-fcf31fecbf57"), | ||
"TestNodeInputModel", | ||
OperatorInput.NO_OPERATOR_ASSIGNED, | ||
OperationTime.notLimited(), | ||
Quantities.getQuantity(1d, PowerSystemUnits.PU), | ||
false, | ||
NodeInput.DEFAULT_GEO_POSITION, | ||
GermanVoltageLevelUtils.LV, | ||
-1, | ||
), | ||
new CosPhiFixed("cosPhiFixed:{(0.0,0.95)}"), | ||
null, | ||
Quantities.getQuantity(282.74d, PowerSystemUnits.VOLTAMPERE), | ||
0.95, | ||
) | ||
|
||
def simulationStartDate = | ||
TimeUtil.withDefaults.toZonedDateTime("2020-01-01T00:00:00Z") | ||
|
||
def simulationEndDate = | ||
TimeUtil.withDefaults.toZonedDateTime("2020-12-31T23:59:00Z") | ||
|
||
def foreSeenOperationInterval = | ||
SystemComponent.determineOperationInterval( | ||
simulationStartDate, | ||
simulationEndDate, | ||
fixedFeedInput.getOperationTime, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even it wasn't used in the groovy test we should use the FixedFeedInputTestData
and DefaultTestData
here
src/test/scala/edu/ie3/simona/model/participant/FixedFeedModelSpec.scala
Outdated
Show resolved
Hide resolved
fixedFeedInput.getId, | ||
foreSeenOperationInterval, | ||
QControl.apply(fixedFeedInput.getqCharacteristics()), | ||
Sq.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refactor this Sq. here as well :)
…Spec.scala Co-authored-by: Daniel Feismann <[email protected]>
FixedFeedModelTest convert from groovy to scala.
This PR is related to Issue #646