summaryrefslogtreecommitdiffstats
path: root/model/policy-model/src/test/java
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-04 17:24:15 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-04 17:25:22 +0100
commit87be30582d1db37bee7c6b456c0c5c3ca9584963 (patch)
tree28806c5866fc5d07c89a06014d7c7d2705772b4f /model/policy-model/src/test/java
parentf32508381ce0b555fc14978cbaa458aa4e2d91c5 (diff)
Fix checkstyle issues in apex model basic
CHeckstyle issues in apex model basic and knock on changes in other apex modules. Issue-ID: POLICY-1034 Change-Id: I65823f5e2e344526abc74b0812877113acb056ec Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'model/policy-model/src/test/java')
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java3
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java8
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java2
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java10
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java14
10 files changed, 27 insertions, 30 deletions
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java
index 28f70f48b..093ed483e 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/DummyLogicReader.java
@@ -23,9 +23,6 @@ package org.onap.policy.apex.model.policymodel.concepts;
import org.onap.policy.apex.model.policymodel.concepts.AxLogic;
import org.onap.policy.apex.model.policymodel.concepts.AxLogicReader;
-/**
- * @author Liam Fallon (liam.fallon@ericsson.com)
- */
public class DummyLogicReader implements AxLogicReader {
/*
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java
index a415a1c69..3b1fc6b8f 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestLogic.java
@@ -83,8 +83,8 @@ public class TestLogic {
final AxReferenceKey logicKey = new AxReferenceKey("LogicParentName", "0.0.1", "PLN", "LN");
logic.setKey(logicKey);
- assertEquals("LogicParentName:0.0.1:PLN:LN", logic.getKey().getID());
- assertEquals("LogicParentName:0.0.1:PLN:LN", logic.getKeys().get(0).getID());
+ assertEquals("LogicParentName:0.0.1:PLN:LN", logic.getKey().getId());
+ assertEquals("LogicParentName:0.0.1:PLN:LN", logic.getKeys().get(0).getId());
logic.setLogicFlavour("LogicFlavour");
assertEquals("LogicFlavour", logic.getLogicFlavour());
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java
index 9da944b60..b2a3911bf 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicies.java
@@ -76,8 +76,8 @@ public class TestPolicies {
}
policy.setKey(policyKey);
- assertEquals("PolicyName:0.0.1", policy.getKey().getID());
- assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getID());
+ assertEquals("PolicyName:0.0.1", policy.getKey().getId());
+ assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getId());
try {
policy.setTemplate(null);
@@ -109,7 +109,7 @@ public class TestPolicies {
policy.setFirstState("FirstState");
assertEquals("FirstState", policy.getFirstState());
- assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getID());
+ assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getId());
policy = new TestApexPolicyModelCreator().getModel().getPolicies().get("policy");
@@ -269,7 +269,7 @@ public class TestPolicies {
// Invalid, no events in event map
policies.setKey(new AxArtifactKey("PoliciesKey", "0.0.1"));
- assertEquals("PoliciesKey:0.0.1", policies.getKey().getID());
+ assertEquals("PoliciesKey:0.0.1", policies.getKey().getId());
result = new AxValidationResult();
result = policies.validate(result);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java
index db1d1ee62..5df831cc7 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestPolicyModel.java
@@ -75,7 +75,7 @@ public class TestPolicyModel {
model.register();
assertNotNull(model.getContextModel());
- assertEquals("ModelKey:0.0.1", model.getKeys().get(0).getID());
+ assertEquals("ModelKey:0.0.1", model.getKeys().get(0).getId());
model.clean();
assertNotNull(model);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java
index 1d62ae63a..c53fff1ca 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestState.java
@@ -86,8 +86,8 @@ public class TestState {
}
state.setKey(stateKey);
- assertEquals("PolicyName:0.0.1:NULL:StateName", state.getKey().getID());
- assertEquals("PolicyName:0.0.1:NULL:StateName", state.getKeys().get(0).getID());
+ assertEquals("PolicyName:0.0.1:NULL:StateName", state.getKey().getId());
+ assertEquals("PolicyName:0.0.1:NULL:StateName", state.getKeys().get(0).getId());
final AxStateOutput so0 = new AxStateOutput(new AxReferenceKey(stateKey, "SO0"), triggerKey, new AxReferenceKey());
final AxStateOutput soU = new AxStateOutput(new AxReferenceKey(stateKey, "SOU"), triggerKey, stateKeyNext);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java
index 5911d41be..5306b7642 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateOutput.java
@@ -60,8 +60,8 @@ public class TestStateOutput {
}
so.setKey(soKey);
- assertEquals("SOStateParent:0.0.1:SOState:SOName", so.getKey().getID());
- assertEquals("SOStateParent:0.0.1:SOState:SOName", so.getKeys().get(0).getID());
+ assertEquals("SOStateParent:0.0.1:SOState:SOName", so.getKey().getId());
+ assertEquals("SOStateParent:0.0.1:SOState:SOName", so.getKeys().get(0).getId());
try {
so.setNextState(null);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java
index c85fda4be..eeaf19e07 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestStateTaskReference.java
@@ -62,8 +62,8 @@ public class TestStateTaskReference {
}
stRef.setKey(stRefKey);
- assertEquals("StateParent:0.0.1:SOState:SOName", stRef.getKey().getID());
- assertEquals("StateParent:0.0.1:SOState:SOName", stRef.getKeys().get(0).getID());
+ assertEquals("StateParent:0.0.1:SOState:SOName", stRef.getKey().getId());
+ assertEquals("StateParent:0.0.1:SOState:SOName", stRef.getKeys().get(0).getId());
try {
stRef.setStateTaskOutputType(null);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java
index 63906add2..ff6ab42b8 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTaskParameter.java
@@ -49,8 +49,8 @@ public class TestTaskParameter {
final AxReferenceKey parKey = new AxReferenceKey("ParParentName", "0.0.1", "PLN", "LN");
par.setKey(parKey);
- assertEquals("ParParentName:0.0.1:PLN:LN", par.getKey().getID());
- assertEquals("ParParentName:0.0.1:PLN:LN", par.getKeys().get(0).getID());
+ assertEquals("ParParentName:0.0.1:PLN:LN", par.getKey().getId());
+ assertEquals("ParParentName:0.0.1:PLN:LN", par.getKeys().get(0).getId());
par.setDefaultValue("DefaultValue");
assertEquals("DefaultValue", par.getTaskParameterValue());
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java
index 967e4e0aa..78691accb 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/TestTasks.java
@@ -67,8 +67,8 @@ public class TestTasks {
final AxArtifactKey taskKey = new AxArtifactKey("TaskName", "0.0.1");
task.setKey(taskKey);
- assertEquals("TaskName:0.0.1", task.getKey().getID());
- assertEquals("TaskName:0.0.1", task.getKeys().get(0).getID());
+ 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");
@@ -114,8 +114,8 @@ public class TestTasks {
assertEquals(tl, task.getTaskLogic());
task.setKey(taskKey);
- assertEquals("TaskName:0.0.1", task.getKey().getID());
- assertEquals("TaskName:0.0.1", task.getKeys().get(0).getID());
+ assertEquals("TaskName:0.0.1", task.getKey().getId());
+ assertEquals("TaskName:0.0.1", task.getKeys().get(0).getId());
task.afterUnmarshal(null, null);
assertEquals(1, task.getTaskParameters().size());
@@ -256,7 +256,7 @@ public class TestTasks {
// Invalid, no tasks in task map
tasks.setKey(new AxArtifactKey("TasksKey", "0.0.1"));
- assertEquals("TasksKey:0.0.1", tasks.getKey().getID());
+ assertEquals("TasksKey:0.0.1", tasks.getKey().getId());
result = new AxValidationResult();
result = tasks.validate(result);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java
index b3fd4a1b0..5dfeede0a 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/TestApexPolicyModel.java
@@ -31,7 +31,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
-import org.onap.policy.apex.model.basicmodel.dao.DAOParameters;
+import org.onap.policy.apex.model.basicmodel.dao.DaoParameters;
import org.onap.policy.apex.model.basicmodel.test.TestApexModel;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
@@ -86,21 +86,21 @@ public class TestApexPolicyModel {
@Test
public void testModelWriteReadXML() throws Exception {
- testApexModel.testApexModelWriteReadXML();
+ testApexModel.testApexModelWriteReadXml();
}
@Test
public void testModelWriteReadJSON() throws Exception {
- testApexModel.testApexModelWriteReadJSON();
+ testApexModel.testApexModelWriteReadJson();
}
@Test
public void testModelWriteReadJPA() throws Exception {
- final DAOParameters daoParameters = new DAOParameters();
- daoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
- daoParameters.setPersistenceUnit("DAOTest");
+ final DaoParameters DaoParameters = new DaoParameters();
+ DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
+ DaoParameters.setPersistenceUnit("DAOTest");
- testApexModel.testApexModelWriteReadJPA(daoParameters);
+ testApexModel.testApexModelWriteReadJpa(DaoParameters);
}
private static final String VALID_MODEL_STRING = "***validation of model successful***";