summaryrefslogtreecommitdiffstats
path: root/models-base
diff options
context:
space:
mode:
Diffstat (limited to 'models-base')
-rw-r--r--models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java3
-rw-r--r--models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java8
-rw-r--r--models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java2
3 files changed, 7 insertions, 6 deletions
diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java b/models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java
index 708bfddfb..cd8b08bfa 100644
--- a/models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java
+++ b/models-base/src/main/java/org/onap/policy/models/base/PfValidationMessage.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,7 +51,7 @@ public class PfValidationMessage {
Assertions.argumentNotNull(message, "message may not be null");
this.observedKey = observedKey;
- this.observedClass = observedClass.getCanonicalName();
+ this.observedClass = observedClass.getName();
this.validationResult = validationResult;
this.message = message;
}
diff --git a/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java b/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java
index 120ddbff9..64612238b 100644
--- a/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java
+++ b/models-base/src/test/java/org/onap/policy/models/base/ValidatedTest.java
@@ -290,13 +290,13 @@ public class ValidatedTest {
// check first item
PfValidationMessage msg = it.next();
- assertEquals(MyValid.class.getName().replace('$', '.'), msg.getObservedClass());
+ assertEquals(MyValid.class.getName(), msg.getObservedClass());
assertEquals(MY_TO_STRING, msg.getObservedKey().toString());
assertTrue(msg.getMessage().contains("index.0 invalid-wrong value"));
// check null value
msg = it.next();
- assertEquals(MyValid.class.getName().replace('$', '.'), msg.getObservedClass());
+ assertEquals(MyValid.class.getName(), msg.getObservedClass());
assertEquals(MY_TO_STRING, msg.getObservedKey().toString());
assertTrue(msg.getMessage().contains("index.2 invalid-wrong value"));
@@ -327,13 +327,13 @@ public class ValidatedTest {
// check first item
PfValidationMessage msg = it.next();
- assertEquals(MyConcept.class.getName().replace('$', '.'), msg.getObservedClass());
+ assertEquals(MyConcept.class.getName(), msg.getObservedClass());
assertEquals(MY_TO_STRING, msg.getObservedKey().toString());
assertTrue(msg.getMessage().contains("index.0 invalid-wrong value"));
// check null value
msg = it.next();
- assertEquals(MyConcept.class.getName().replace('$', '.'), msg.getObservedClass());
+ assertEquals(MyConcept.class.getName(), msg.getObservedClass());
assertEquals(MY_TO_STRING, msg.getObservedKey().toString());
assertTrue(msg.getMessage().contains("index.2 invalid-wrong value"));
diff --git a/models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java b/models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java
index ef0d8d609..d536e406f 100644
--- a/models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java
+++ b/models-base/src/test/java/org/onap/policy/models/base/ValidationTest.java
@@ -88,7 +88,7 @@ public class ValidationTest {
assertEquals(PfValidationResult.ValidationResult.INVALID, result.getMessageList().get(3).getValidationResult());
assertEquals(SOME_MESSAGE, result.getMessageList().get(3).getMessage());
- assertEquals(PfConceptKey.class.getCanonicalName(), result.getMessageList().get(3).getObservedClass());
+ assertEquals(PfConceptKey.class.getName(), result.getMessageList().get(3).getObservedClass());
assertEquals(PfConceptKey.getNullKey(), result.getMessageList().get(3).getObservedKey());
}
}