aboutsummaryrefslogtreecommitdiffstats
path: root/models/src/test/java
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2024-08-07 10:52:23 +0100
committerFrancescoFioraEst <francesco.fiora@est.tech>2024-08-08 10:59:04 +0100
commita944487231ad341d8d6b0f302c47bad20169c107 (patch)
treef9a72b2c1f6fa8928914753bb82526ec75306d0b /models/src/test/java
parenta2477d552ad3993989a4f8b7a7adac6686719cf3 (diff)
Add validation for state set by the participant
Issue-ID: POLICY-5097 Change-Id: I7520b7220c8525448eff707e2e57debca63520fe Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'models/src/test/java')
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/utils/AcmUtilsTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/utils/AcmUtilsTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/utils/AcmUtilsTest.java
index 5d0a7d95a..97af64cf7 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/utils/AcmUtilsTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/utils/AcmUtilsTest.java
@@ -238,6 +238,16 @@ class AcmUtilsTest {
assertEquals(element.getOutProperties(), result.getOutProperties());
}
+ @Test
+ void testValidatedMessage() {
+ var message = "completed";
+ assertEquals(message, AcmUtils.validatedMessage(message));
+
+ var serviceTemplate = CommonTestData.getToscaServiceTemplate(TOSCA_TEMPLATE_YAML);
+ message = serviceTemplate.toString();
+ assertEquals(message.substring(0, 255), AcmUtils.validatedMessage(message));
+ }
+
private AutomationComposition getDummyAutomationComposition() {
var automationComposition = new AutomationComposition();
automationComposition.setCompositionId(UUID.randomUUID());