aboutsummaryrefslogtreecommitdiffstats
path: root/model/engine-model/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-10 17:05:36 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-10 17:07:47 +0100
commitd100854291559df1426ea1e64351872ae2d3867b (patch)
tree78baab90111307cd3d2460b2cca37e93a20ac9a3 /model/engine-model/src/test
parent8f82d7adcb53b349e14d3b356bda03588a554f95 (diff)
Checkstyle changes for apex model
Fix checkstyle warnings in the apex mode and knock on changes. Issue-ID: POLICY-1034 Change-Id: I10537e4288e9cad5ef18165ed2cdc1d3ab3139c1 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'model/engine-model/src/test')
-rw-r--r--model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineModel.java1
-rw-r--r--model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineStats.java1
-rw-r--r--model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModel.java24
-rw-r--r--model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModelCreator.java3
4 files changed, 21 insertions, 8 deletions
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineModel.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineModel.java
index 79537cfaf..2c1ab4bff 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineModel.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineModel.java
@@ -37,6 +37,7 @@ import org.onap.policy.apex.model.contextmodel.concepts.AxContextAlbums;
import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
/**
+ * Test engine models.
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class TestEngineModel {
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineStats.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineStats.java
index 6346e59f7..fb99e265b 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineStats.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/concepts/TestEngineStats.java
@@ -34,6 +34,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
/**
+ * Test engine statistics.
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class TestEngineStats {
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModel.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModel.java
index c8076aab7..10abbf3fe 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModel.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModel.java
@@ -38,6 +38,11 @@ public class TestApexEngineModel {
private Connection connection;
TestApexModel<AxEngineModel> testApexModel;
+ /**
+ * Set up the test.
+ *
+ * @throws Exception errors from test setup
+ */
@Before
public void setup() throws Exception {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
@@ -71,17 +76,17 @@ public class TestApexEngineModel {
}
@Test
- public void testModelWriteReadXML() throws Exception {
+ public void testModelWriteReadXml() throws Exception {
testApexModel.testApexModelWriteReadXml();
}
@Test
- public void testModelWriteReadJSON() throws Exception {
+ public void testModelWriteReadJson() throws Exception {
testApexModel.testApexModelWriteReadJson();
}
@Test
- public void testModelWriteReadJPA() throws Exception {
+ public void testModelWriteReadJpa() throws Exception {
final DaoParameters DaoParameters = new DaoParameters();
DaoParameters.setPluginClass("org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao");
DaoParameters.setPersistenceUnit("DAOTest");
@@ -92,11 +97,14 @@ public class TestApexEngineModel {
private static final String VALID_MODEL_STRING = "***validation of model successful***";
private static final String INVALID_MODEL_STRING = "\n" + "***validation of model failed***\n"
- + "AxArtifactKey:(name=AnEngine,version=0.0.1):org.onap.policy.apex.model.enginemodel.concepts.AxEngineModel:INVALID:AxEngineModel - state is UNDEFINED\n"
- + "********************************";
+ + "AxArtifactKey:(name=AnEngine,version=0.0.1):"
+ + "org.onap.policy.apex.model.enginemodel.concepts.AxEngineModel:INVALID:"
+ + "AxEngineModel - state is UNDEFINED\n" + "********************************";
private static final String INVALID_MODEL_MALSTRUCTURED_STRING = "\n" + "***validation of model failed***\n"
- + "AxArtifactKey:(name=AnEngine,version=0.0.1):org.onap.policy.apex.model.enginemodel.concepts.AxEngineModel:INVALID:AxEngineModel - timestamp is not set\n"
- + "AxArtifactKey:(name=AnEngine,version=0.0.1):org.onap.policy.apex.model.enginemodel.concepts.AxEngineModel:INVALID:AxEngineModel - state is UNDEFINED\n"
- + "********************************";
+ + "AxArtifactKey:(name=AnEngine,version=0.0.1):"
+ + "org.onap.policy.apex.model.enginemodel.concepts.AxEngineModel:INVALID:"
+ + "AxEngineModel - timestamp is not set\n" + "AxArtifactKey:(name=AnEngine,version=0.0.1):"
+ + "org.onap.policy.apex.model.enginemodel.concepts.AxEngineModel:INVALID:"
+ + "AxEngineModel - state is UNDEFINED\n" + "********************************";
}
diff --git a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModelCreator.java b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModelCreator.java
index 4a4a0cc88..732fd2235 100644
--- a/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModelCreator.java
+++ b/model/engine-model/src/test/java/org/onap/policy/apex/model/enginemodel/handling/TestApexEngineModelCreator.java
@@ -82,6 +82,9 @@ public class TestApexEngineModelCreator implements TestApexModelCreator<AxEngine
return engineModel;
}
+ /**
+ * Get a malstructured model.
+ */
public AxEngineModel getMalstructuredModel() {
final AxEngineModel engineModel = getModel();