diff options
Diffstat (limited to 'examples/examples-aadm/src')
-rw-r--r-- | examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java | 10 | ||||
-rw-r--r-- | examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java | 8 | ||||
-rw-r--r-- | examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModel.java | 4 | ||||
-rw-r--r-- | examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMModelCreator.java | 1 | ||||
-rw-r--r-- | examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestAADMUseCase.java | 11 | ||||
-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 |
6 files changed, 28 insertions, 14 deletions
diff --git a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java index 13fbb1eca..1f3cf5185 100644 --- a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java +++ b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/ENodeBStatus.java @@ -28,7 +28,7 @@ import java.io.Serializable; public class ENodeBStatus implements Serializable { private static final long serialVersionUID = 2852523814242234172L; - private final String eNodeB; + private final String enodeB; private long dosCount = 0; private boolean beingProbed = false; @@ -36,10 +36,10 @@ public class ENodeBStatus implements Serializable { /** * The Constructor initiates the status of the eNodeB. * - * @param eNodeB the e node B + * @param enodeB the eNodeB */ - public ENodeBStatus(final String eNodeB) { - this.eNodeB = eNodeB; + public ENodeBStatus(final String enodeB) { + this.enodeB = enodeB; } /** @@ -48,7 +48,7 @@ public class ENodeBStatus implements Serializable { * @return the eNodeB name */ public String getENodeB() { - return eNodeB; + return enodeB; } /** diff --git a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java index f59e982b0..8f89d4c15 100644 --- a/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java +++ b/examples/examples-aadm/src/main/java/org/onap/policy/apex/examples/aadm/concepts/IMSIStatus.java @@ -34,7 +34,7 @@ public class IMSIStatus implements Serializable { private boolean anomalous = false; private long anomalousTime = TIME_NOT_SET; - private String eNodeBID; + private String enodeBId; private long blackListedTime = TIME_NOT_SET; private long blockingCount = 0; @@ -98,7 +98,7 @@ public class IMSIStatus implements Serializable { * @return theeNodeB ID to which the IMSI is attached */ public String getENodeBID() { - return eNodeBID; + return enodeBId; } /** @@ -107,7 +107,7 @@ public class IMSIStatus implements Serializable { * @param incomingENodeBID the eNodeB ID to which the IMSI is attached */ public void setENodeBID(final String incomingENodeBID) { - this.eNodeBID = incomingENodeBID; + this.enodeBId = incomingENodeBID; } /** @@ -116,7 +116,7 @@ public class IMSIStatus implements Serializable { * @return true, if eNodeB ID to which the IMSI is attached is set */ public boolean checkSetENodeBID() { - return (eNodeBID != null); + return (enodeBId != null); } /** 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"); |