summaryrefslogtreecommitdiffstats
path: root/examples/examples-myfirstpolicy
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 /examples/examples-myfirstpolicy
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 'examples/examples-myfirstpolicy')
-rw-r--r--examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java8
-rw-r--r--examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java12
-rw-r--r--examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java8
-rw-r--r--examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml4
4 files changed, 16 insertions, 16 deletions
diff --git a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java
index 7343f747d..fb47f6cf9 100644
--- a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java
+++ b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java
@@ -50,13 +50,13 @@ public final class MFPDomainModelSaver {
AxPolicyModel mfpPolicyModel = new MFPDomainModelFactory().getMFP1PolicyModel();
ApexModelSaver<AxPolicyModel> mfpModelSaver =
new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/1/");
- mfpModelSaver.apexModelWriteJSON();
- mfpModelSaver.apexModelWriteXML();
+ mfpModelSaver.apexModelWriteJson();
+ mfpModelSaver.apexModelWriteXml();
mfpPolicyModel = new MFPDomainModelFactory().getMFP2PolicyModel();
mfpModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/2/");
- mfpModelSaver.apexModelWriteJSON();
- mfpModelSaver.apexModelWriteXML();
+ mfpModelSaver.apexModelWriteJson();
+ mfpModelSaver.apexModelWriteXml();
}
}
diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java
index a8be6c4e4..64ff5b1ab 100644
--- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java
+++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java
@@ -76,10 +76,10 @@ public class TestMFPModel {
@Test
public void testModelValid() throws Exception {
AxValidationResult result = testApexModel1.testApexModelValid();
- assertTrue("Model did not validate cleanly", result.isOK());
+ assertTrue("Model did not validate cleanly", result.isOk());
result = testApexModel2.testApexModelValid();
- assertTrue("Model did not validate cleanly", result.isOK());
+ assertTrue("Model did not validate cleanly", result.isOk());
}
/**
@@ -89,8 +89,8 @@ public class TestMFPModel {
*/
@Test
public void testModelWriteReadXML() throws Exception {
- testApexModel1.testApexModelWriteReadXML();
- testApexModel2.testApexModelWriteReadXML();
+ testApexModel1.testApexModelWriteReadXml();
+ testApexModel2.testApexModelWriteReadXml();
}
/**
@@ -100,7 +100,7 @@ public class TestMFPModel {
*/
@Test
public void testModelWriteReadJSON() throws Exception {
- testApexModel1.testApexModelWriteReadJSON();
- testApexModel2.testApexModelWriteReadJSON();
+ testApexModel1.testApexModelWriteReadJson();
+ testApexModel2.testApexModelWriteReadJson();
}
}
diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java
index 22f985f80..1068a5398 100644
--- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java
+++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java
@@ -262,7 +262,7 @@ public class TestMFPUseCase {
continue;
}
assertTrue("Event file " + inputFile + " has a field " + e.getKey() + " but this is not defined for "
- + event.getID(), (event.getParameterMap().containsKey(e.getKey())));
+ + event.getId(), (event.getParameterMap().containsKey(e.getKey())));
if (jsonObject.get(e.getKey()).isJsonNull()) {
ret.put(e.getKey(), null);
}
@@ -270,7 +270,7 @@ public class TestMFPUseCase {
for (final AxField field : event.getFields()) {
if (!field.getOptional()) {
assertTrue("Event file " + inputFile + " is missing a mandatory field " + field.getKey().getLocalName()
- + " for " + event.getID(), jsonObject.has(field.getKey().getLocalName()));
+ + " for " + event.getId(), jsonObject.has(field.getKey().getLocalName()));
} else {
ret.put(field.getKey().getLocalName(), null);
}
@@ -329,7 +329,7 @@ public class TestMFPUseCase {
continue;
}
assertTrue("Event file " + inputFile + " has a field " + e.getKey() + " but this is not defined for "
- + event.getID(), (event.getParameterMap().containsKey(e.getKey())));
+ + event.getId(), (event.getParameterMap().containsKey(e.getKey())));
if (jsonObject.get(e.getKey()).isJsonNull()) {
ret.put(e.getKey(), null);
}
@@ -337,7 +337,7 @@ public class TestMFPUseCase {
for (final AxField field : event.getFields()) {
if (!field.getOptional()) {
assertTrue("Event file " + inputFile + " is missing a mandatory field " + field.getKey().getLocalName()
- + " for " + event.getID(), jsonObject.has(field.getKey().getLocalName()));
+ + " for " + event.getId(), jsonObject.has(field.getKey().getLocalName()));
} else {
ret.put(field.getKey().getLocalName(), null);
}
diff --git a/examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml b/examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml
index 4dcba14b7..7acc7a0e9 100644
--- a/examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml
+++ b/examples/examples-myfirstpolicy/src/test/resources/META-INF/persistence.xml
@@ -23,8 +23,8 @@
<persistence-unit name="MFPModelTest" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner</class>
- <class>org.onap.policy.apex.model.basicmodel.dao.converters.UUID2String</class>
+ <class>org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner</class>
+ <class>org.onap.policy.apex.model.basicmodel.dao.converters.Uuid2String</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxConcept</class>
<class>org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo</class>