aboutsummaryrefslogtreecommitdiffstats
path: root/models/src/test
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-06-16 10:42:14 +0100
committerFrancesco Fiora <francesco.fiora@est.tech>2023-06-16 09:51:29 +0000
commit0f24f33b124bf326e4b7dbaa2a55cab72696b9ee (patch)
tree6fcf5bc915bd52d1e0071401293ebe0fdc4d9495 /models/src/test
parenta2320d29b9373041db88395d9fdda7ea84d38807 (diff)
Add support for Prime Deprime Failure Handling in ACM-Runtime
Issue-ID: POLICY-4714 Change-Id: I1f3cf8f0fcebc7c48b3632ad10aa8907c41cdb5a Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'models/src/test')
-rw-r--r--models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolverTest.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolverTest.java b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolverTest.java
index bf27c3e4f..5ea13c94a 100644
--- a/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolverTest.java
+++ b/models/src/test/java/org/onap/policy/clamp/models/acm/persistence/provider/AcTypeStateResolverTest.java
@@ -24,6 +24,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.models.acm.concepts.AcTypeState;
+import org.onap.policy.clamp.models.acm.concepts.StateChangeResult;
import org.onap.policy.clamp.models.acm.messages.rest.commissioning.PrimeOrder;
class AcTypeStateResolverTest {
@@ -31,25 +32,26 @@ class AcTypeStateResolverTest {
@Test
void testAcTypeState() {
var acTypeStateResolver = new AcTypeStateResolver();
- var result = acTypeStateResolver.resolve(PrimeOrder.PRIME, AcTypeState.COMMISSIONED);
+ var result =
+ acTypeStateResolver.resolve(PrimeOrder.PRIME, AcTypeState.COMMISSIONED, StateChangeResult.NO_ERROR);
assertThat(result).isEqualTo(PrimeOrder.PRIME);
- result = acTypeStateResolver.resolve(PrimeOrder.PRIME, AcTypeState.PRIMED);
+ result = acTypeStateResolver.resolve(PrimeOrder.PRIME, AcTypeState.PRIMED, StateChangeResult.NO_ERROR);
assertThat(result).isEqualTo(PrimeOrder.PRIME);
- result = acTypeStateResolver.resolve(PrimeOrder.PRIME, AcTypeState.PRIMING);
+ result = acTypeStateResolver.resolve(PrimeOrder.PRIME, AcTypeState.PRIMING, StateChangeResult.NO_ERROR);
assertThat(result).isEqualTo(PrimeOrder.NONE);
- result = acTypeStateResolver.resolve(PrimeOrder.PRIME, AcTypeState.DEPRIMING);
+ result = acTypeStateResolver.resolve(PrimeOrder.PRIME, AcTypeState.DEPRIMING, StateChangeResult.NO_ERROR);
assertThat(result).isEqualTo(PrimeOrder.NONE);
- result = acTypeStateResolver.resolve(PrimeOrder.DEPRIME, AcTypeState.COMMISSIONED);
+ result = acTypeStateResolver.resolve(PrimeOrder.DEPRIME, AcTypeState.COMMISSIONED, StateChangeResult.NO_ERROR);
assertThat(result).isEqualTo(PrimeOrder.DEPRIME);
- result = acTypeStateResolver.resolve(PrimeOrder.DEPRIME, AcTypeState.PRIMED);
+ result = acTypeStateResolver.resolve(PrimeOrder.DEPRIME, AcTypeState.PRIMED, StateChangeResult.NO_ERROR);
assertThat(result).isEqualTo(PrimeOrder.DEPRIME);
- result = acTypeStateResolver.resolve(PrimeOrder.DEPRIME, AcTypeState.PRIMING);
+ result = acTypeStateResolver.resolve(PrimeOrder.DEPRIME, AcTypeState.PRIMING, StateChangeResult.NO_ERROR);
assertThat(result).isEqualTo(PrimeOrder.NONE);
- result = acTypeStateResolver.resolve(PrimeOrder.DEPRIME, AcTypeState.DEPRIMING);
+ result = acTypeStateResolver.resolve(PrimeOrder.DEPRIME, AcTypeState.DEPRIMING, StateChangeResult.NO_ERROR);
assertThat(result).isEqualTo(PrimeOrder.NONE);
- result = acTypeStateResolver.resolve(null, null);
+ result = acTypeStateResolver.resolve(null, null, null);
assertThat(result).isEqualTo(PrimeOrder.NONE);
}
}