summaryrefslogtreecommitdiffstats
path: root/examples/examples-myfirstpolicy/src
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-09-04 20:13:38 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-04 20:13:38 +0000
commitf7689b84472ab4698d9d96f1de08402208d99ca8 (patch)
treef003c5aef834f2158726ab678eb9a76e1ae37dac /examples/examples-myfirstpolicy/src
parent25ac320ced13ae5da0e55db5404f62237bdaa491 (diff)
parent87be30582d1db37bee7c6b456c0c5c3ca9584963 (diff)
Merge "Fix checkstyle issues in apex model basic"
Diffstat (limited to 'examples/examples-myfirstpolicy/src')
-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>