summaryrefslogtreecommitdiffstats
path: root/examples/examples-aadm/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'examples/examples-aadm/src/test')
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java4
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java1
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java11
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAadmDbWrite.java (renamed from examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java)8
4 files changed, 19 insertions, 5 deletions
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java
index 7a453ae24..ba992b522 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java
@@ -38,6 +38,10 @@ public class TestAADMModel {
private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
+ /**
+ * Sets up embedded Derby database and the AADM model for the tests.
+ * @throws Exception exception to be thrown while setting up the database connection
+ */
@Before
public void setup() throws Exception {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java
index 9aa2095c7..421a45a15 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java
@@ -25,6 +25,7 @@ import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
/**
+ * This class implements Interface TestApexModelCreator to support AADM model.
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
public class TestAADMModelCreator implements TestApexModelCreator<AxPolicyModel> {
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java
index f7ce2fdf0..5ff70d1af 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java
@@ -50,7 +50,9 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
- * User: Sergey Sachkov Date: 13/10/15
+ * This class tests AADM use case.
+ * @author Sergey Sachkov (sergey.sachkov@ericsson.com)
+ *
*/
public class TestAADMUseCase {
private static final XLogger logger = XLoggerFactory.getXLogger(TestAADMUseCase.class);
@@ -59,15 +61,18 @@ public class TestAADMUseCase {
private ContextParameters contextParameters;
private EngineParameters engineParameters;
+ /**
+ * Test AADM use case setup.
+ */
@Before
public void beforeTest() {
schemaParameters = new SchemaParameters();
-
+
schemaParameters.setName(ContextParameterConstants.SCHEMA_GROUP_NAME);
schemaParameters.getSchemaHelperParameterMap().put("JAVA", new JavaSchemaHelperParameters());
ParameterService.register(schemaParameters);
-
+
contextParameters = new ContextParameters();
contextParameters.setName(ContextParameterConstants.MAIN_GROUP_NAME);
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAadmDbWrite.java
index dd6a5eb77..b67bb6245 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMDBWrite.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAadmDbWrite.java
@@ -31,10 +31,14 @@ 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;
-public class TestAADMDBWrite {
+public class TestAadmDbWrite {
private Connection connection;
TestApexModel<AxPolicyModel> testApexModel;
+ /**
+ * Sets up embedded Derby database and the Apex AADM model for the tests.
+ * @throws Exception exception to be thrown while setting up the database connection
+ */
@Before
public void setup() throws Exception {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
@@ -50,7 +54,7 @@ public class TestAADMDBWrite {
}
@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("AADMModelTest");