diff options
Diffstat (limited to 'model/engine-model/src')
6 files changed, 25 insertions, 12 deletions
diff --git a/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineModel.java b/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineModel.java index b7733c6a3..9b015552a 100644 --- a/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineModel.java +++ b/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineModel.java @@ -55,8 +55,8 @@ import org.onap.policy.apex.model.utilities.Assertions; * is used by an Apex engine to pass its current execution state to any system that wishes to query * that information. The time stamp of the engine model is the time at which the state and * statistics of the engine were read. - * <p> - * Validation checks that the current state {@link AxEngineState} is defined and that the time stamp + * + * <p>Validation checks that the current state {@link AxEngineState} is defined and that the time stamp * is set on the engine model. */ @Entity @@ -100,7 +100,7 @@ public class AxEngineModel extends AxContextModel { } /** - * Copy constructor + * Copy constructor. * * @param copyConcept the concept to copy from */ diff --git a/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineStats.java b/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineStats.java index 077065bb5..896794ce7 100644 --- a/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineStats.java +++ b/model/engine-model/src/main/java/org/onap/policy/apex/model/enginemodel/concepts/AxEngineStats.java @@ -108,7 +108,7 @@ public class AxEngineStats extends AxConcept { } /** - * Copy constructor + * Copy constructor. * * @param copyConcept the concept to copy from */ 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(); |