summaryrefslogtreecommitdiffstats
path: root/models/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'models/src/test')
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantRestartTest.java11
-rwxr-xr-xmodels/src/test/java/org/onap/policy/clamp/models/acm/utils/AcmUtilsTest.java6
-rw-r--r--models/src/test/resources/json/AutomationCompositionElementNoOrderedState.json13
3 files changed, 21 insertions, 9 deletions
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantRestartTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantRestartTest.java
index ba84ac76f..4a2a958d6 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantRestartTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/messages/dmaap/participant/ParticipantRestartTest.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2023 Nordix Foundation.
+ * Copyright (C) 2023-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,9 +27,12 @@ import static org.onap.policy.clamp.models.acm.messages.dmaap.participant.Partic
import java.time.Instant;
import java.util.List;
+import java.util.Map;
import java.util.UUID;
import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.models.acm.concepts.AcElementRestart;
+import org.onap.policy.clamp.models.acm.concepts.DeployState;
+import org.onap.policy.clamp.models.acm.concepts.LockState;
import org.onap.policy.clamp.models.acm.concepts.ParticipantDefinition;
import org.onap.policy.clamp.models.acm.concepts.ParticipantRestartAc;
import org.onap.policy.clamp.models.acm.utils.CommonTestData;
@@ -62,6 +65,12 @@ class ParticipantRestartTest {
acElement.setId(UUID.randomUUID());
var id = new ToscaConceptIdentifier("id", "1.2.3");
acElement.setDefinition(id);
+ acElement.setDeployState(DeployState.DEPLOYED);
+ acElement.setLockState(LockState.LOCKED);
+ acElement.setOperationalState("OperationalState");
+ acElement.setUseState("UseState");
+ acElement.setProperties(Map.of("key", "value"));
+ acElement.setOutProperties(Map.of("keyOut", "valueOut"));
var acRestart = new ParticipantRestartAc();
acRestart.setAcElementList(List.of(acElement));
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 8e10e81ad..bc8741e65 100755
--- 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
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021-2023 Nordix Foundation.
+ * Copyright (C) 2021-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -226,6 +226,10 @@ class AcmUtilsTest {
assertEquals(element.getDefinition(), result.getDefinition());
assertEquals(element.getDeployState(), result.getDeployState());
assertEquals(element.getLockState(), result.getLockState());
+ assertEquals(element.getOperationalState(), result.getOperationalState());
+ assertEquals(element.getUseState(), result.getUseState());
+ assertEquals(element.getProperties(), result.getProperties());
+ assertEquals(element.getOutProperties(), result.getOutProperties());
}
private AutomationComposition getDummyAutomationComposition() {
diff --git a/models/src/test/resources/json/AutomationCompositionElementNoOrderedState.json b/models/src/test/resources/json/AutomationCompositionElementNoOrderedState.json
index 934535a05..abb821536 100644
--- a/models/src/test/resources/json/AutomationCompositionElementNoOrderedState.json
+++ b/models/src/test/resources/json/AutomationCompositionElementNoOrderedState.json
@@ -4,11 +4,10 @@
"name": "aceDef",
"version": "0.0.1"
},
- "participantType": {
- "name": "participantType",
- "version": "0.0.1"
- },
- "state": "UNINITIALISED",
- "orderedState": null,
- "properties":{"key":"{}"}
+ "deployState": "DEPLOYED",
+ "lockState": "LOCKED",
+ "operationalState": "operationalState",
+ "useState": "useState",
+ "properties":{"key":"{}"},
+ "outProperties":{"key":"{}"}
}