From a00536c5c65efbef3fc23bcd83fdcca940b3ceba Mon Sep 17 00:00:00 2001 From: liamfallon Date: Mon, 18 Jan 2021 09:25:34 +0000 Subject: Create ToscaConceptIdentifier from ToscaEntityKey THis change adds a method to create a ToscaConceptIdentifer from a ToscaEntityKey class. This method reduces the code vloume when translating between these identifiers. Issue-ID: POLICY-2971 Change-Id: Idd62339935d2ba78e6c60b40ee95fedac0642bef Signed-off-by: liamfallon --- .../onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java | 1 + 1 file changed, 1 insertion(+) (limited to 'models-tosca/src/test/java/org/onap') diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java index 59f471ae8..ba39621c6 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyTest.java @@ -46,6 +46,7 @@ public class ToscaPolicyTest { policy.setTypeVersion("3.2.1"); assertEquals("ToscaEntityKey(name=my_name, version=1.2.3)", policy.getKey().toString()); + assertEquals(new ToscaConceptIdentifier("my_name", "1.2.3"), policy.getKey().asIdentifier()); ToscaConceptIdentifier ident = policy.getIdentifier(); assertEquals("my_name", ident.getName()); -- cgit 1.2.3-korg