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
@@ -116,7 +116,7 @@ class ValidationUtilsTest extends Specification {
116
116
117
117
where:
118
118
invalidObject || expectedException
119
-
newCoordinate(10, 10) ||newNotImplementedException("Cannot validate object of class '"+ invalidObject.getClass().getSimpleName() +"', as no routine is implemented.")
119
+
newCoordinate(10, 10) ||newFailedValidationException("Cannot validate object of class '"+ invalidObject.getClass().getSimpleName() +"', as no routine is implemented.")
120
120
}
121
121
122
122
def"The validation check method recognizes all potential errors for an asset"() {
@@ -171,7 +171,7 @@ class ValidationUtilsTest extends Specification {
171
171
172
172
then:
173
173
InvalidEntityException ex = thrown()
174
-
ex.message =="Entity is invalid because of: The following quantities have to be zero or positive: -1 µS/km [LineTypeInput{uuid=3bed3eb3-9790-4874-89b5-a5434d408088, id=lineType_AtoB, b=-1 µS/km, g=0.0 µS/km, r=0.437 Ω/km, x=0.356 Ω/km, iMax=300 A, vRated=20 kV}]"
174
+
ex.message =="Entity is invalid because of: \nThe following quantities have to be zero or positive: -1 µS/km [LineTypeInput{uuid=3bed3eb3-9790-4874-89b5-a5434d408088, id=lineType_AtoB, b=-1 µS/km, g=0.0 µS/km, r=0.437 Ω/km, x=0.356 Ω/km, iMax=300 A, vRated=20 kV}]"
175
175
}
176
176
177
177
def"The check for zero or negative entities should work as expected"() {
@@ -208,7 +208,7 @@ class ValidationUtilsTest extends Specification {
208
208
209
209
then:
210
210
InvalidEntityException ex = thrown()
211
-
ex.message =="Entity is invalid because of: The following quantities have to be positive: 0.0 µS/km [LineTypeInput{uuid=3bed3eb3-9790-4874-89b5-a5434d408088, id=lineType_AtoB, b=0.0 µS/km, g=0.0 µS/km, r=0.437 Ω/km, x=0.356 Ω/km, iMax=300 A, vRated=20 kV}]"
211
+
ex.message =="Entity is invalid because of: \nThe following quantities have to be positive: 0.0 µS/km [LineTypeInput{uuid=3bed3eb3-9790-4874-89b5-a5434d408088, id=lineType_AtoB, b=0.0 µS/km, g=0.0 µS/km, r=0.437 Ω/km, x=0.356 Ω/km, iMax=300 A, vRated=20 kV}]"
212
212
}
213
213
214
214
def"Checking an unsupported asset leads to an exception"() {
@@ -247,7 +247,7 @@ class ValidationUtilsTest extends Specification {
247
247
then:
248
248
exceptions.size() ==2
249
249
def e = exceptions.get(0).exception.get()
250
-
e.message.startsWith("Entity is invalid because of: No ID assigned [AssetTypeInput")
250
+
e.message.startsWith("Entity is invalid because of: \nNo ID assigned [AssetTypeInput")
0 commit comments