Skip to content
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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

pierrepetersmeier
Copy link
Contributor

FixedFeedModelTest convert from groovy to scala.

This PR is related to Issue #646

@pierrepetersmeier pierrepetersmeier added the test Issues related to (unit) tests label Jun 17, 2024
@pierrepetersmeier pierrepetersmeier added this to the Version 4.0 milestone Jun 17, 2024
@pierrepetersmeier pierrepetersmeier self-assigned this Jun 17, 2024
@pierrepetersmeier pierrepetersmeier linked an issue Jun 17, 2024 that may be closed by this pull request
Copy link
Member

@danielfeismann danielfeismann left a 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 :)

Comment on lines +29 to +62
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,
)
Copy link
Member

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

fixedFeedInput.getId,
foreSeenOperationInterval,
QControl.apply(fixedFeedInput.getqCharacteristics()),
Sq.create(
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues related to (unit) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert groovy tests to ScalaTest, remove groovy
2 participants