diff options
Diffstat (limited to 'model/policy-model/src/test')
7 files changed, 20 insertions, 162 deletions
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java index 48022e878..b699b5d48 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java @@ -37,8 +37,6 @@ import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums; import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas; import org.onap.policy.apex.model.eventmodel.concepts.AxEvents; import org.onap.policy.apex.model.eventmodel.concepts.AxField; -import org.onap.policy.apex.model.eventmodel.concepts.AxInputField; -import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField; import org.onap.policy.apex.model.policymodel.handling.SupportApexPolicyModelCreator; /** @@ -183,32 +181,6 @@ public class PolicyModelTest { result = model.validate(result); assertEquals(ValidationResult.VALID, result.getValidationResult()); - final AxInputField badInField = new AxInputField( - new AxReferenceKey(model.getTasks().get("task").getKey(), "BadInField"), - new AxArtifactKey("NonExistantSchema", "0.0.1")); - model.getTasks().get("task").getInputFields().put(badInField.getKey().getLocalName(), badInField); - result = new AxValidationResult(); - result = model.validate(result); - assertEquals(ValidationResult.INVALID, result.getValidationResult()); - - model.getTasks().get("task").getInputFields().remove(badInField.getKey().getLocalName()); - result = new AxValidationResult(); - result = model.validate(result); - assertEquals(ValidationResult.VALID, result.getValidationResult()); - - final AxOutputField badOutField = new AxOutputField( - new AxReferenceKey(model.getTasks().get("task").getKey(), "BadOutField"), - new AxArtifactKey("NonExistantSchema", "0.0.1")); - model.getTasks().get("task").getOutputFields().put(badOutField.getKey().getLocalName(), badOutField); - result = new AxValidationResult(); - result = model.validate(result); - assertEquals(ValidationResult.INVALID, result.getValidationResult()); - - model.getTasks().get("task").getOutputFields().remove(badOutField.getKey().getLocalName()); - result = new AxValidationResult(); - result = model.validate(result); - assertEquals(ValidationResult.VALID, result.getValidationResult()); - model.getTasks().get("task").getContextAlbumReferences() .add(new AxArtifactKey("NonExistantContextAlbum", "0.0.1")); result = new AxValidationResult(); @@ -267,16 +239,6 @@ public class PolicyModelTest { result = model.validate(result); assertEquals(ValidationResult.VALID, result.getValidationResult()); - model.getTasks().get("task").getInputFields().put(badInField.getKey().getLocalName(), badInField); - result = new AxValidationResult(); - result = model.validate(result); - assertEquals(ValidationResult.INVALID, result.getValidationResult()); - - model.getTasks().get("task").getInputFields().remove(badInField.getKey().getLocalName()); - result = new AxValidationResult(); - result = model.validate(result); - assertEquals(ValidationResult.VALID, result.getValidationResult()); - model.getPolicies().get("policy").getStateMap().get("state").setTaskSelectionLogic(savedTaskSelectionLogic); result = new AxValidationResult(); result = model.validate(result); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java index 95266acc8..89dc9a048 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TasksTest.java @@ -25,7 +25,6 @@ package org.onap.policy.apex.model.policymodel.concepts; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import java.util.Map; import java.util.TreeMap; @@ -36,9 +35,6 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.apex.model.eventmodel.concepts.AxEvent; -import org.onap.policy.apex.model.eventmodel.concepts.AxField; -import org.onap.policy.apex.model.eventmodel.concepts.AxInputField; -import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField; /** * Test policy tasks. @@ -49,19 +45,15 @@ public class TasksTest { @Test public void testTasks() { - final TreeMap<String, AxInputField> ifEmptyMap = new TreeMap<>(); - final TreeMap<String, AxOutputField> ofEmptyMap = new TreeMap<>(); final TreeMap<String, AxTaskParameter> tpEmptyMap = new TreeMap<>(); final TreeSet<AxArtifactKey> ctxtEmptySet = new TreeSet<>(); - final TreeMap<String, AxInputField> ifMap = new TreeMap<>(); - final TreeMap<String, AxOutputField> ofMap = new TreeMap<>(); final TreeMap<String, AxTaskParameter> tpMap = new TreeMap<>(); final TreeSet<AxArtifactKey> ctxtSet = new TreeSet<>(); assertNotNull(new AxTask()); assertNotNull(new AxTask(new AxArtifactKey())); - assertNotNull(new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, new AxTaskLogic())); + assertNotNull(new AxTask(new AxArtifactKey(), tpMap, ctxtSet, new AxTaskLogic())); final AxTask task = new AxTask(); @@ -70,40 +62,15 @@ public class TasksTest { assertEquals("TaskName:0.0.1", task.getKey().getId()); assertEquals("TaskName:0.0.1", task.getKeys().get(0).getId()); - final AxArtifactKey f0SchemaKey = new AxArtifactKey("FS0", "0.0.1"); - - final AxInputField if0 = new AxInputField(new AxReferenceKey(taskKey, "IF0"), f0SchemaKey, false); - final AxInputField if1 = new AxInputField(new AxReferenceKey(taskKey, "IF1"), f0SchemaKey, false); - final AxOutputField of0 = new AxOutputField(new AxReferenceKey(taskKey, "OF0"), f0SchemaKey, false); - final AxOutputField of1 = new AxOutputField(new AxReferenceKey(taskKey, "OF1"), f0SchemaKey, false); final AxTaskParameter tp0 = new AxTaskParameter(new AxReferenceKey(taskKey, "TP0"), "DefaultValue"); final AxArtifactKey cr0 = new AxArtifactKey("ContextReference", "0.0.1"); final AxTaskLogic tl = new AxTaskLogic(taskKey, "LogicName", "LogicFlavour", "Logic"); - ifMap.put(if0.getKey().getLocalName(), if0); - ofMap.put(of0.getKey().getLocalName(), of0); tpMap.put(tp0.getKey().getLocalName(), tp0); ctxtSet.add(cr0); - task.setInputFields(ifMap); - assertEquals(ifMap, task.getInputFields()); - assertTrue(task.getInputFieldSet().contains(if0)); - assertTrue(task.getRawInputFields().keySet().contains(if0.getKey().getLocalName())); - - task.setOutputFields(ofMap); - assertEquals(ofMap, task.getOutputFields()); - assertTrue(task.getOutputFieldSet().contains(of0)); - assertTrue(task.getRawOutputFields().keySet().contains(of0.getKey().getLocalName())); task.setInputEvent(new AxEvent()); task.setOutputEvents(Map.of("Event", new AxEvent())); - final TreeMap<String, AxField> ifDupMap = new TreeMap<>(); - final TreeMap<String, AxField> ofDupMap = new TreeMap<>(); - ifDupMap.put(if1.getKey().getLocalName(), if1); - ofDupMap.put(of1.getKey().getLocalName(), of1); - task.duplicateInputFields(ifDupMap); - task.duplicateOutputFields(ofDupMap); - assertTrue(ifMap.containsKey("IF1")); - assertTrue(ofMap.containsKey("OF1")); task.setTaskParameters(tpMap); assertEquals(tpMap, task.getTaskParameters()); @@ -188,25 +155,23 @@ public class TasksTest { assertEquals(task, clonedTask); assertNotNull(task); assertNotEquals(task, (Object) "Hello"); - assertNotEquals(task, new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl)); - assertNotEquals(task, new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl)); - assertNotEquals(task, new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl)); - assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpEmptyMap, ctxtSet, tl)); - assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtEmptySet, tl)); - assertNotEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, new AxTaskLogic())); - assertEquals(task, new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, tl)); + assertNotEquals(task, new AxTask(new AxArtifactKey(), tpMap, ctxtSet, tl)); + assertEquals(task, new AxTask(taskKey, tpMap, ctxtSet, tl)); + assertNotEquals(task, new AxTask(taskKey, tpEmptyMap, ctxtSet, tl)); + assertNotEquals(task, new AxTask(taskKey, tpMap, ctxtEmptySet, tl)); + assertNotEquals(task, new AxTask(taskKey, tpMap, ctxtSet, new AxTaskLogic())); + assertEquals(task, new AxTask(taskKey, tpMap, ctxtSet, tl)); assertEquals(0, task.compareTo(task)); assertEquals(0, task.compareTo(clonedTask)); assertNotEquals(0, task.compareTo(new AxArtifactKey())); assertNotEquals(0, task.compareTo(null)); - assertNotEquals(0, task.compareTo(new AxTask(new AxArtifactKey(), ifMap, ofMap, tpMap, ctxtSet, tl))); - assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifEmptyMap, ofMap, tpMap, ctxtSet, tl))); - assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofEmptyMap, tpMap, ctxtSet, tl))); - assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofMap, tpEmptyMap, ctxtSet, tl))); - assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtEmptySet, tl))); - assertNotEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, new AxTaskLogic()))); - assertEquals(0, task.compareTo(new AxTask(taskKey, ifMap, ofMap, tpMap, ctxtSet, tl))); + assertNotEquals(0, task.compareTo(new AxTask(new AxArtifactKey(), tpMap, ctxtSet, tl))); + assertEquals(0, task.compareTo(new AxTask(taskKey, tpMap, ctxtSet, tl))); + assertNotEquals(0, task.compareTo(new AxTask(taskKey, tpEmptyMap, ctxtSet, tl))); + assertNotEquals(0, task.compareTo(new AxTask(taskKey, tpMap, ctxtEmptySet, tl))); + assertNotEquals(0, task.compareTo(new AxTask(taskKey, tpMap, ctxtSet, new AxTaskLogic()))); + assertEquals(0, task.compareTo(new AxTask(taskKey, tpMap, ctxtSet, tl))); assertNotNull(task.getKeys()); diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java index 3192079d7..3e3051021 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2021 Bell Canada. 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. @@ -112,19 +113,7 @@ public class ApexPolicyModelTest { + "org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum:INVALID:scope is not defined\n" + "AxArtifactKey:(name=contextAlbum1,version=0.0.1):" + "org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbum:INVALID:scope is not defined\n" - + "AxReferenceKey:" - + "(parentKeyName=policy,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=state):" - + "org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel:INVALID:" - + "task output field AxOutputField:(key=AxReferenceKey:" - + "(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR0)," - + "fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false) for task " - + "task:0.0.1 not in output event outEvent0:0.0.1\n" + "AxReferenceKey:" - + "(parentKeyName=policy,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=state):" - + "org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel:INVALID:" - + "task output field AxOutputField:(key=AxReferenceKey:" - + "(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR1)," - + "fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false) for task " - + "task:0.0.1 not in output event outEvent0:0.0.1\n" + "********************************"; + + "********************************"; private static final String INVALID_MODEL_MALSTRUCTURED_STRING = "\n" + "***validation of model failed***\n" + "AxArtifactKey:(name=policyModel_KeyInfo,version=0.0.1):" diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java index 3ff85c898..b1e2d5cbd 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2021 Bell Canada. 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,8 +51,8 @@ public class PolicyAnalyserTest { private static final String EXPECTED_ANALYSIS_RESULT = "" + "Context Schema usage\n" + " MapType:0.0.1\n" + " contextAlbum0:0.0.1\n" + " StringType:0.0.1\n" + " contextAlbum1:0.0.1\n" + " eventContextItem0:0.0.1\n" + " inEvent:0.0.1\n" + " outEvent0:0.0.1\n" + " outEvent1:0.0.1\n" - + " task:0.0.1\n" + " eventContextItem1:0.0.1\n" + " inEvent:0.0.1\n" + " outEvent0:0.0.1\n" - + " outEvent1:0.0.1\n" + " task:0.0.1\n" + "Context Album usage\n" + " contextAlbum0:0.0.1\n" + + " eventContextItem1:0.0.1\n" + " inEvent:0.0.1\n" + " outEvent0:0.0.1\n" + + " outEvent1:0.0.1\n" + "Context Album usage\n" + " contextAlbum0:0.0.1\n" + " task:0.0.1\n" + " policy:0.0.1:NULL:state\n" + " contextAlbum1:0.0.1\n" + " task:0.0.1\n" + " policy:0.0.1:NULL:state\n" + "Event usage\n" + " inEvent:0.0.1\n" + " policy:0.0.1:NULL:state\n" + " outEvent0:0.0.1\n" + " policy:0.0.1:NULL:state\n" + " outEvent1:0.0.1 (unused)\n" + "Task usage\n" diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java index ea2de8603..85040221a 100644 --- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java +++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java @@ -36,8 +36,6 @@ import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas; import org.onap.policy.apex.model.eventmodel.concepts.AxEvent; import org.onap.policy.apex.model.eventmodel.concepts.AxEvents; import org.onap.policy.apex.model.eventmodel.concepts.AxField; -import org.onap.policy.apex.model.eventmodel.concepts.AxInputField; -import org.onap.policy.apex.model.eventmodel.concepts.AxOutputField; import org.onap.policy.apex.model.policymodel.concepts.AxPolicies; import org.onap.policy.apex.model.policymodel.concepts.AxPolicy; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -117,27 +115,6 @@ public class SupportApexPolicyModelCreator implements TestApexModelCreator<AxPol final AxTask task = new AxTask(new AxArtifactKey("task", "0.0.1")); - for (final AxField field : inEvent.getFields()) { - final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(), - "inputFields", field.getKey().getLocalName()); - final AxInputField inputField = new AxInputField(fieldkey, field.getSchema()); - task.getInputFields().put(inputField.getKey().getLocalName(), inputField); - } - - for (final AxField field : outEvent0.getFields()) { - final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(), - "outputFields", field.getKey().getLocalName()); - final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema()); - task.getOutputFields().put(outputField.getKey().getLocalName(), outputField); - } - - for (final AxField field : outEvent1.getFields()) { - final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(), - "outputFields", field.getKey().getLocalName()); - final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema()); - task.getOutputFields().put(outputField.getKey().getLocalName(), outputField); - } - task.setInputEvent(inEvent); task.setOutputEvents(Map.of(outEvent0.getId(), outEvent0, outEvent1.getId(), outEvent1)); @@ -271,27 +248,6 @@ public class SupportApexPolicyModelCreator implements TestApexModelCreator<AxPol final AxTask task = new AxTask(new AxArtifactKey("taskA", "0.0.1")); - for (final AxField field : inEvent.getFields()) { - final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(), - "inputFieldsA", field.getKey().getLocalName()); - final AxInputField inputField = new AxInputField(fieldkey, field.getSchema()); - task.getInputFields().put(inputField.getKey().getLocalName(), inputField); - } - - for (final AxField field : outEvent0.getFields()) { - final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(), - "outputFieldsA", field.getKey().getLocalName()); - final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema()); - task.getOutputFields().put(outputField.getKey().getLocalName(), outputField); - } - - for (final AxField field : outEvent1.getFields()) { - final AxReferenceKey fieldkey = new AxReferenceKey(task.getKey().getName(), task.getKey().getVersion(), - "outputFieldsA", field.getKey().getLocalName()); - final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema()); - task.getOutputFields().put(outputField.getKey().getLocalName(), outputField); - } - task.setInputEvent(inEvent); task.setOutputEvents(Map.of(outEvent0.getId(), outEvent0, outEvent1.getId(), outEvent1)); @@ -400,20 +356,6 @@ public class SupportApexPolicyModelCreator implements TestApexModelCreator<AxPol final AxTask anotherTask = new AxTask(new AxArtifactKey("anotherTask", "0.0.1")); - for (final AxField field : inEvent.getFields()) { - final AxReferenceKey fieldkey = new AxReferenceKey(anotherTask.getKey().getName(), - anotherTask.getKey().getVersion(), "inputFields", field.getKey().getLocalName()); - final AxInputField inputField = new AxInputField(fieldkey, field.getSchema()); - anotherTask.getInputFields().put(inputField.getKey().getLocalName(), inputField); - } - - for (final AxField field : outEvent0.getFields()) { - final AxReferenceKey fieldkey = new AxReferenceKey(anotherTask.getKey().getName(), - anotherTask.getKey().getVersion(), "outputFields", field.getKey().getLocalName()); - final AxOutputField outputField = new AxOutputField(fieldkey, field.getSchema()); - anotherTask.getOutputFields().put(outputField.getKey().getLocalName(), outputField); - } - anotherTask.setInputEvent(inEvent); anotherTask.setOutputEvents(Map.of(outEvent0.getId(), outEvent0)); final AxTaskParameter taskPar0 = new AxTaskParameter(new AxReferenceKey(anotherTask.getKey(), "taskParameter0"), diff --git a/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt b/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt index d3aad785e..7dd0b3955 100644 --- a/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt +++ b/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonDifferentVerboseValues.txt @@ -33,7 +33,7 @@ left key AxArtifactKey:(name=PolicyModel,version=0.0.1) equals right key AxArtif *** all right keys in left *** all values in left and right are identical *** list of identical entries in left and right -key=AxArtifactKey:(name=task,version=0.0.1),value=AxTask:(key=AxArtifactKey:(name=task,version=0.0.1),inputFields={IEPAR0=AxInputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=inputFields,localName=IEPAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), IEPAR1=AxInputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=inputFields,localName=IEPAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false)},outputFields={OE0PAR0=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE0PAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), OE0PAR1=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE0PAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false), OE1PAR0=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), OE1PAR1=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false)},taskParameters={taskParameter0=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter0),defaultValue=Task parameter 0 value), taskParameter1=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter1),defaultValue=Task parameter 1 value)},contextAlbumReferenceSet=[AxArtifactKey:(name=contextAlbum0,version=0.0.1), AxArtifactKey:(name=contextAlbum1,version=0.0.1)],taskLogic=AxTaskLogic:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskLogic),logicFlavour=MVEL,logic=Some task logic)) +key=AxArtifactKey:(name=task,version=0.0.1),value=AxTask:(key=AxArtifactKey:(name=task,version=0.0.1),taskParameters={taskParameter0=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter0),defaultValue=Task parameter 0 value), taskParameter1=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter1),defaultValue=Task parameter 1 value)},contextAlbumReferenceSet=[AxArtifactKey:(name=contextAlbum0,version=0.0.1), AxArtifactKey:(name=contextAlbum1,version=0.0.1)],taskLogic=AxTaskLogic:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskLogic),logicFlavour=MVEL,logic=Some task logic)) *** policy differences *** left key AxArtifactKey:(name=PolicyModel,version=0.0.1) equals right key AxArtifactKey:(name=PolicyModel,version=0.0.1) *** all left keys in right diff --git a/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt b/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt index f566a7e5f..149bec002 100644 --- a/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt +++ b/model/policy-model/src/test/resources/checkFiles/PolicyModelComparisonIdenticalVerboseValues.txt @@ -33,7 +33,7 @@ left key AxArtifactKey:(name=PolicyModel,version=0.0.1) equals right key AxArtif *** all right keys in left *** all values in left and right are identical *** list of identical entries in left and right -key=AxArtifactKey:(name=task,version=0.0.1),value=AxTask:(key=AxArtifactKey:(name=task,version=0.0.1),inputFields={IEPAR0=AxInputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=inputFields,localName=IEPAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), IEPAR1=AxInputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=inputFields,localName=IEPAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false)},outputFields={OE0PAR0=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE0PAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), OE0PAR1=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE0PAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false), OE1PAR0=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR0),fieldSchemaKey=AxArtifactKey:(name=eventContextItem0,version=0.0.1),optional=false), OE1PAR1=AxOutputField:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=outputFields,localName=OE1PAR1),fieldSchemaKey=AxArtifactKey:(name=eventContextItem1,version=0.0.1),optional=false)},taskParameters={taskParameter0=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter0),defaultValue=Task parameter 0 value), taskParameter1=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter1),defaultValue=Task parameter 1 value)},contextAlbumReferenceSet=[AxArtifactKey:(name=contextAlbum0,version=0.0.1), AxArtifactKey:(name=contextAlbum1,version=0.0.1)],taskLogic=AxTaskLogic:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskLogic),logicFlavour=MVEL,logic=Some task logic)) +key=AxArtifactKey:(name=task,version=0.0.1),value=AxTask:(key=AxArtifactKey:(name=task,version=0.0.1),taskParameters={taskParameter0=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter0),defaultValue=Task parameter 0 value), taskParameter1=AxTaskParameter:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskParameter1),defaultValue=Task parameter 1 value)},contextAlbumReferenceSet=[AxArtifactKey:(name=contextAlbum0,version=0.0.1), AxArtifactKey:(name=contextAlbum1,version=0.0.1)],taskLogic=AxTaskLogic:(key=AxReferenceKey:(parentKeyName=task,parentKeyVersion=0.0.1,parentLocalName=NULL,localName=taskLogic),logicFlavour=MVEL,logic=Some task logic)) *** policy differences *** left key AxArtifactKey:(name=PolicyModel,version=0.0.1) equals right key AxArtifactKey:(name=PolicyModel,version=0.0.1) *** all left keys in right @@ -66,4 +66,3 @@ key=AxArtifactKey:(name=policy,version=0.0.1),value=AxKeyInfo:(artifactId=AxArti key=AxArtifactKey:(name=task,version=0.0.1),value=AxKeyInfo:(artifactId=AxArtifactKey:(name=task,version=0.0.1),uuid=0ce9168c-e6df-414f-9646-6da464b6e016,description=Generated description for concept referred to by key "task:0.0.1") key=AxArtifactKey:(name=tasks,version=0.0.1),value=AxKeyInfo:(artifactId=AxArtifactKey:(name=tasks,version=0.0.1),uuid=0ce9168c-e6df-414f-9646-6da464b6e017,description=Generated description for concept referred to by key "tasks:0.0.1") *********************************** - |