From 87be30582d1db37bee7c6b456c0c5c3ca9584963 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 4 Sep 2018 17:24:15 +0100 Subject: 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 --- .../test/common/model/EvalDomainModelFactory.java | 8 ++++---- .../test/common/model/SampleDomainModelFactory.java | 2 +- .../test/common/model/SampleDomainModelSaver.java | 20 ++++++++++---------- .../TestApexSamplePolicyCreateModelFiles.java | 20 ++++++++++---------- .../script/handling/TestApexSamplePolicyDBWrite.java | 10 +++++----- .../script/handling/TestApexSamplePolicyModel.java | 14 +++++++------- .../src/test/resources/META-INF/persistence.xml | 4 ++-- 7 files changed, 39 insertions(+), 39 deletions(-) (limited to 'testsuites') diff --git a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java index 83a4ccc76..a3f626f48 100644 --- a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java +++ b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java @@ -263,8 +263,8 @@ public class EvalDomainModelFactory { policyModel.getKeyInformation().generateKeyInfo(policyModel); final AxValidationResult result = policyModel.validate(new AxValidationResult()); - if (!result.isOK()) { - throw new ApexRuntimeException("model " + policyModel.getID() + " is not valid" + result); + if (!result.isOk()) { + throw new ApexRuntimeException("model " + policyModel.getId() + " is not valid" + result); } return policyModel; } @@ -434,8 +434,8 @@ public class EvalDomainModelFactory { policyModel.getKeyInformation().generateKeyInfo(policyModel); final AxValidationResult result = policyModel.validate(new AxValidationResult()); - if (!result.isOK()) { - throw new ApexRuntimeException("model " + policyModel.getID() + " is not valid" + result); + if (!result.isOk()) { + throw new ApexRuntimeException("model " + policyModel.getId() + " is not valid" + result); } return policyModel; } diff --git a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/SampleDomainModelFactory.java b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/SampleDomainModelFactory.java index 24993674c..184529fa9 100644 --- a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/SampleDomainModelFactory.java +++ b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/SampleDomainModelFactory.java @@ -535,7 +535,7 @@ public class SampleDomainModelFactory { AxValidationResult result = policyModel.validate(new AxValidationResult()); if (!result.getValidationResult().equals(AxValidationResult.ValidationResult.VALID)) { - throw new ApexRuntimeException("model " + policyModel.getID() + " is not valid" + result); + throw new ApexRuntimeException("model " + policyModel.getId() + " is not valid" + result); } return policyModel; } diff --git a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/SampleDomainModelSaver.java b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/SampleDomainModelSaver.java index c346d94c0..6ca644ff4 100644 --- a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/SampleDomainModelSaver.java +++ b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/SampleDomainModelSaver.java @@ -51,32 +51,32 @@ public final class SampleDomainModelSaver { // Save Java model final AxPolicyModel javaPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JAVA"); final ApexModelSaver javaModelSaver = new ApexModelSaver(AxPolicyModel.class, javaPolicyModel, args[0]); - javaModelSaver.apexModelWriteJSON(); - javaModelSaver.apexModelWriteXML(); + javaModelSaver.apexModelWriteJson(); + javaModelSaver.apexModelWriteXml(); // Save Javascript model final AxPolicyModel javascriptPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JAVASCRIPT"); final ApexModelSaver javascriptModelSaver = new ApexModelSaver(AxPolicyModel.class, javascriptPolicyModel, args[0]); - javascriptModelSaver.apexModelWriteJSON(); - javascriptModelSaver.apexModelWriteXML(); + javascriptModelSaver.apexModelWriteJson(); + javascriptModelSaver.apexModelWriteXml(); // Save JRuby model final AxPolicyModel jRubyPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JRUBY"); final ApexModelSaver jRubyModelSaver = new ApexModelSaver(AxPolicyModel.class, jRubyPolicyModel, args[0]); - jRubyModelSaver.apexModelWriteJSON(); - jRubyModelSaver.apexModelWriteXML(); + jRubyModelSaver.apexModelWriteJson(); + jRubyModelSaver.apexModelWriteXml(); // Save Jython model final AxPolicyModel jythonPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JYTHON"); final ApexModelSaver jythonModelSaver = new ApexModelSaver(AxPolicyModel.class, jythonPolicyModel, args[0]); - jythonModelSaver.apexModelWriteJSON(); - jythonModelSaver.apexModelWriteXML(); + jythonModelSaver.apexModelWriteJson(); + jythonModelSaver.apexModelWriteXml(); // Save MVEL model final AxPolicyModel mvelPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("MVEL"); final ApexModelSaver mvelModelSaver = new ApexModelSaver(AxPolicyModel.class, mvelPolicyModel, args[0]); - mvelModelSaver.apexModelWriteJSON(); - mvelModelSaver.apexModelWriteXML(); + mvelModelSaver.apexModelWriteJson(); + mvelModelSaver.apexModelWriteXml(); } } diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyCreateModelFiles.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyCreateModelFiles.java index 8113436ca..384ad5114 100644 --- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyCreateModelFiles.java +++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyCreateModelFiles.java @@ -30,8 +30,8 @@ public class TestApexSamplePolicyCreateModelFiles { final TestApexSamplePolicyModelCreator apexPolicyModelCreator = new TestApexSamplePolicyModelCreator("JAVA"); final TestApexModel testApexPolicyModel = new TestApexModel(AxPolicyModel.class, apexPolicyModelCreator); - testApexPolicyModel.testApexModelWriteReadXML(); - testApexPolicyModel.testApexModelWriteReadJSON(); + testApexPolicyModel.testApexModelWriteReadXml(); + testApexPolicyModel.testApexModelWriteReadJson(); } @Test @@ -40,8 +40,8 @@ public class TestApexSamplePolicyCreateModelFiles { new TestApexSamplePolicyModelCreator("JAVASCRIPT"); final TestApexModel testApexPolicyModel = new TestApexModel(AxPolicyModel.class, apexPolicyModelCreator); - testApexPolicyModel.testApexModelWriteReadXML(); - testApexPolicyModel.testApexModelWriteReadJSON(); + testApexPolicyModel.testApexModelWriteReadXml(); + testApexPolicyModel.testApexModelWriteReadJson(); } @Test @@ -49,8 +49,8 @@ public class TestApexSamplePolicyCreateModelFiles { final TestApexSamplePolicyModelCreator apexPolicyModelCreator = new TestApexSamplePolicyModelCreator("JRUBY"); final TestApexModel testApexPolicyModel = new TestApexModel(AxPolicyModel.class, apexPolicyModelCreator); - testApexPolicyModel.testApexModelWriteReadXML(); - testApexPolicyModel.testApexModelWriteReadJSON(); + testApexPolicyModel.testApexModelWriteReadXml(); + testApexPolicyModel.testApexModelWriteReadJson(); } @Test @@ -58,8 +58,8 @@ public class TestApexSamplePolicyCreateModelFiles { final TestApexSamplePolicyModelCreator apexPolicyModelCreator = new TestApexSamplePolicyModelCreator("JYTHON"); final TestApexModel testApexPolicyModel = new TestApexModel(AxPolicyModel.class, apexPolicyModelCreator); - testApexPolicyModel.testApexModelWriteReadXML(); - testApexPolicyModel.testApexModelWriteReadJSON(); + testApexPolicyModel.testApexModelWriteReadXml(); + testApexPolicyModel.testApexModelWriteReadJson(); } @Test @@ -67,7 +67,7 @@ public class TestApexSamplePolicyCreateModelFiles { final TestApexSamplePolicyModelCreator apexPolicyModelCreator = new TestApexSamplePolicyModelCreator("MVEL"); final TestApexModel testApexPolicyModel = new TestApexModel(AxPolicyModel.class, apexPolicyModelCreator); - testApexPolicyModel.testApexModelWriteReadXML(); - testApexPolicyModel.testApexModelWriteReadJSON(); + testApexPolicyModel.testApexModelWriteReadXml(); + testApexPolicyModel.testApexModelWriteReadJson(); } } diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyDBWrite.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyDBWrite.java index 48e2f8058..45314672e 100644 --- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyDBWrite.java +++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyDBWrite.java @@ -26,7 +26,7 @@ import java.sql.DriverManager; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.onap.policy.apex.model.basicmodel.dao.DAOParameters; +import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -50,10 +50,10 @@ public class TestApexSamplePolicyDBWrite { @Test public void testModelWriteReadJPA() throws Exception { - final DAOParameters daoParameters = new DAOParameters(); - daoParameters.setPluginClass(DefaultApexDao.class.getCanonicalName()); - daoParameters.setPersistenceUnit("SampleModelTest"); + final DaoParameters DaoParameters = new DaoParameters(); + DaoParameters.setPluginClass(DefaultApexDao.class.getCanonicalName()); + DaoParameters.setPersistenceUnit("SampleModelTest"); - testApexModel.testApexModelWriteReadJPA(daoParameters); + testApexModel.testApexModelWriteReadJpa(DaoParameters); } } diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyModel.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyModel.java index 3673dae2f..36810b44b 100644 --- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyModel.java +++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/plugins/executor/test/script/handling/TestApexSamplePolicyModel.java @@ -29,7 +29,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult; -import org.onap.policy.apex.model.basicmodel.dao.DAOParameters; +import org.onap.policy.apex.model.basicmodel.dao.DaoParameters; import org.onap.policy.apex.model.basicmodel.dao.impl.DefaultApexDao; import org.onap.policy.apex.model.basicmodel.test.TestApexModel; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -60,21 +60,21 @@ public class TestApexSamplePolicyModel { @Test public void testModelWriteReadXML() throws Exception { - testApexModel.testApexModelWriteReadXML(); + testApexModel.testApexModelWriteReadXml(); } @Test public void testModelWriteReadJSON() throws Exception { - testApexModel.testApexModelWriteReadJSON(); + testApexModel.testApexModelWriteReadJson(); } @Test public void testModelWriteReadJPA() throws Exception { - final DAOParameters daoParameters = new DAOParameters(); - daoParameters.setPluginClass(DefaultApexDao.class.getCanonicalName()); - daoParameters.setPersistenceUnit("SampleModelTest"); + final DaoParameters DaoParameters = new DaoParameters(); + DaoParameters.setPluginClass(DefaultApexDao.class.getCanonicalName()); + DaoParameters.setPersistenceUnit("SampleModelTest"); - testApexModel.testApexModelWriteReadJPA(daoParameters); + testApexModel.testApexModelWriteReadJpa(DaoParameters); } diff --git a/testsuites/integration/integration-executor-test/src/test/resources/META-INF/persistence.xml b/testsuites/integration/integration-executor-test/src/test/resources/META-INF/persistence.xml index 5ba5bfa4c..40773a4d4 100644 --- a/testsuites/integration/integration-executor-test/src/test/resources/META-INF/persistence.xml +++ b/testsuites/integration/integration-executor-test/src/test/resources/META-INF/persistence.xml @@ -23,8 +23,8 @@ org.eclipse.persistence.jpa.PersistenceProvider - org.onap.policy.apex.model.basicmodel.dao.converters.CDATAConditioner - org.onap.policy.apex.model.basicmodel.dao.converters.UUID2String + org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner + org.onap.policy.apex.model.basicmodel.dao.converters.Uuid2String org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey org.onap.policy.apex.model.basicmodel.concepts.AxConcept org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo -- cgit 1.2.3-korg