You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Enhanced `ValidationUtils` for `LoadModel` to check for correct profile naming [#1357](https://github.com/ie3-institute/PowerSystemDataModel/issues/1357)
@@ -324,9 +325,41 @@ class SystemParticipantValidationUtilsTest extends Specification {
324
325
325
326
where:
326
327
invalidLoad || expectedSize || expectedException
327
-
SystemParticipantTestData.loadInput.copy().loadprofile(null).build() ||1||newInvalidEntityException("No standard load profile defined for load", invalidLoad)
328
+
SystemParticipantTestData.loadInput.copy().loadprofile(null).build() ||1||newInvalidEntityException("No load profile defined for load", invalidLoad)
328
329
SystemParticipantTestData.loadInput.copy().sRated(Quantities.getQuantity(-25d, ACTIVE_POWER_IN)).eConsAnnual(Quantities.getQuantity(-4000, ENERGY_IN)).build() ||1||newInvalidEntityException("The following quantities have to be zero or positive: -25 kVA, -4000 kWh", invalidLoad)
329
330
SystemParticipantTestData.loadInput.copy().cosPhiRated(2).build() ||1||newInvalidEntityException("Rated power factor of LoadInput must be between 0 and 1", invalidLoad)
331
+
SystemParticipantTestData.loadInput.copy().loadprofile(createInvalidStandardLoadProfile("h1")).build() ||1||newInvalidEntityException("Load profile must contain at least one valid entry: h0, g[0-6], l[0-2], ep1, ez2, random, or LoadProfile#NO_LOAD_PROFILE.", invalidLoad)
332
+
SystemParticipantTestData.loadInput.copy().loadprofile(createInvalidStandardLoadProfile("g7")).build() ||1||newInvalidEntityException("Load profile must contain at least one valid entry: h0, g[0-6], l[0-2], ep1, ez2, random, or LoadProfile#NO_LOAD_PROFILE.", invalidLoad)
333
+
SystemParticipantTestData.loadInput.copy().loadprofile(createInvalidStandardLoadProfile("l3")).build() ||1||newInvalidEntityException("Load profile must contain at least one valid entry: h0, g[0-6], l[0-2], ep1, ez2, random, or LoadProfile#NO_LOAD_PROFILE.", invalidLoad)
334
+
SystemParticipantTestData.loadInput.copy().loadprofile(createInvalidStandardLoadProfile("invalid")).build() ||1||newInvalidEntityException("Load profile must contain at least one valid entry: h0, g[0-6], l[0-2], ep1, ez2, random, or LoadProfile#NO_LOAD_PROFILE.", invalidLoad)
335
+
}
336
+
337
+
// Helper method to create invalid standard load profiles for testing
0 commit comments