diff options
Diffstat (limited to 'examples/examples-myfirstpolicy/src')
-rw-r--r-- | examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpLogic.java (renamed from examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPLogic.java) | 20 | ||||
-rw-r--r-- | examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModel.java (renamed from examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModel.java) | 10 | ||||
-rw-r--r-- | examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCli.java (renamed from examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModelCLI.java) | 12 | ||||
-rw-r--r-- | examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCreator.java (renamed from examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModelCreator.java) | 6 | ||||
-rw-r--r-- | examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpUseCase.java (renamed from examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPUseCase.java) | 8 |
5 files changed, 28 insertions, 28 deletions
diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPLogic.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpLogic.java index 697a3d99a..651bd9280 100644 --- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPLogic.java +++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpLogic.java @@ -39,9 +39,9 @@ import org.onap.policy.apex.model.policymodel.concepts.AxTask; import org.onap.policy.common.utils.resources.ResourceUtils; /** - * The Class TestMFPLogic. + * The Class TestMfpLogic. */ -public class TestMFPLogic { +public class TestMfpLogic { private static final Map<String, String> LOGICEXTENSIONS = new LinkedHashMap<>(); @@ -49,7 +49,7 @@ public class TestMFPLogic { * Test setup. */ @BeforeClass - public static void testMFPUseCaseSetup() { + public static void testMfpUseCaseSetup() { LOGICEXTENSIONS.put("MVEL", "mvel"); LOGICEXTENSIONS.put("JAVASCRIPT", "js"); } @@ -58,12 +58,12 @@ public class TestMFPLogic { * Check logic for MyFirstPolicy#1. */ @Test - public void testMFP1TaskLogic() { + public void testMfp1TaskLogic() { final AxPolicyModel apexPolicyModel = new MFPDomainModelFactory().getMFP1PolicyModel(); assertNotNull(apexPolicyModel); final Map<String, String> logics = new LinkedHashMap<>(); - logics.putAll(getTSLLogics(apexPolicyModel)); + logics.putAll(getTslLogics(apexPolicyModel)); logics.putAll(getTaskLogics(apexPolicyModel)); for (final Entry<String, String> logicvalue : logics.entrySet()) { @@ -84,12 +84,12 @@ public class TestMFPLogic { * Check logic for MyFirstPolicyAlt#1. */ @Test - public void testMFP1AltTaskLogic() { + public void testMfp1AltTaskLogic() { final AxPolicyModel apexPolicyModel = new MFPDomainModelFactory().getMFP1AltPolicyModel(); assertNotNull(apexPolicyModel); final Map<String, String> logics = new LinkedHashMap<>(); - logics.putAll(getTSLLogics(apexPolicyModel)); + logics.putAll(getTslLogics(apexPolicyModel)); logics.putAll(getTaskLogics(apexPolicyModel)); for (final Entry<String, String> logicvalue : logics.entrySet()) { @@ -109,12 +109,12 @@ public class TestMFPLogic { * Check logic for MyFirstPolicy2. */ @Test - public void testMFP2TaskLogic() { + public void testMfp2TaskLogic() { final AxPolicyModel apexPolicyModel = new MFPDomainModelFactory().getMFP2PolicyModel(); assertNotNull(apexPolicyModel); final Map<String, String> logics = new LinkedHashMap<>(); - logics.putAll(getTSLLogics(apexPolicyModel)); + logics.putAll(getTslLogics(apexPolicyModel)); logics.putAll(getTaskLogics(apexPolicyModel)); for (final Entry<String, String> logicvalue : logics.entrySet()) { @@ -136,7 +136,7 @@ public class TestMFPLogic { * @param apexPolicyModel the apex policy model * @return the TSL logics */ - private Map<String, String> getTSLLogics(final AxPolicyModel apexPolicyModel) { + private Map<String, String> getTslLogics(final AxPolicyModel apexPolicyModel) { final Map<String, String> ret = new LinkedHashMap<>(); for (final Entry<AxArtifactKey, AxPolicy> policyentry : apexPolicyModel.getPolicies().getPolicyMap() .entrySet()) { 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 64ff5b1ab..808da4866 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 @@ -38,7 +38,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; * * @author John Keeney (john.keeney@ericsson.com) */ -public class TestMFPModel { +public class TestMfpModel { private static Connection connection; private static TestApexModel<AxPolicyModel> testApexModel1; @@ -53,8 +53,8 @@ public class TestMFPModel { public static void setup() throws Exception { Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance(); connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true"); - testApexModel1 = new TestApexModel<>(AxPolicyModel.class, new TestMFPModelCreator.TestMFP1ModelCreator()); - testApexModel2 = new TestApexModel<>(AxPolicyModel.class, new TestMFPModelCreator.TestMFP2ModelCreator()); + testApexModel1 = new TestApexModel<>(AxPolicyModel.class, new TestMfpModelCreator.TestMfp1ModelCreator()); + testApexModel2 = new TestApexModel<>(AxPolicyModel.class, new TestMfpModelCreator.TestMfp2ModelCreator()); } /** @@ -88,7 +88,7 @@ public class TestMFPModel { * @throws Exception if there is an error */ @Test - public void testModelWriteReadXML() throws Exception { + public void testModelWriteReadXml() throws Exception { testApexModel1.testApexModelWriteReadXml(); testApexModel2.testApexModelWriteReadXml(); } @@ -99,7 +99,7 @@ public class TestMFPModel { * @throws Exception if there is an error */ @Test - public void testModelWriteReadJSON() throws Exception { + public void testModelWriteReadJson() throws Exception { testApexModel1.testApexModelWriteReadJson(); testApexModel2.testApexModelWriteReadJson(); } diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModelCLI.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCli.java index fe9d3a205..0d6b4737c 100644 --- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModelCLI.java +++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCli.java @@ -36,7 +36,7 @@ import org.onap.policy.apex.model.utilities.TextFileUtils; /** * Test MyFirstPolicyModel CLI. */ -public class TestMFPModelCLI { +public class TestMfpModelCli { private static AxPolicyModel testApexModel1; private static AxPolicyModel testApexModel2; @@ -47,8 +47,8 @@ public class TestMFPModelCLI { */ @BeforeClass public static void setup() throws Exception { - testApexModel1 = new TestMFPModelCreator.TestMFP1ModelCreator().getModel(); - testApexModel2 = new TestMFPModelCreator.TestMFP2ModelCreator().getModel(); + testApexModel1 = new TestMfpModelCreator.TestMfp1ModelCreator().getModel(); + testApexModel2 = new TestMfpModelCreator.TestMfp2ModelCreator().getModel(); } /** @@ -58,17 +58,17 @@ public class TestMFPModelCLI { * @throws ApexModelException ifd there is an Apex Error */ @Test - public void testCLIPolicy() throws IOException, ApexModelException { + public void testCliPolicy() throws IOException, ApexModelException { final File tempLogFile1 = File.createTempFile("TestMyFirstPolicy1CLI", ".log"); final File tempModelFile1 = File.createTempFile("TestMyFirstPolicy1CLI", ".json"); final File tempLogFile2 = File.createTempFile("TestMyFirstPolicy2CLI", ".log"); final File tempModelFile2 = File.createTempFile("TestMyFirstPolicy2CLI", ".json"); final String[] testApexModel1CliArgs = - { "-c", "src/main/resources/examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.apex", "-l", + { "-c", "src/main/resources/examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.apex", "-l", tempLogFile1.getAbsolutePath(), "-o", tempModelFile1.getAbsolutePath() }; final String[] testApexModel2CliArgs = - { "-c", "src/main/resources/examples/models/MyFirstPolicy/2/MyFirstPolicyModel_0.0.1.apex", "-l", + { "-c", "src/main/resources/examples/models/MyFirstPolicy/2/MyFirstPolicyModel_0.0.1.apex", "-l", tempLogFile2.getAbsolutePath(), "-o", tempModelFile2.getAbsolutePath() }; new ApexCLIEditorMain(testApexModel1CliArgs); diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModelCreator.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCreator.java index 2f51f2851..ebbdac7c2 100644 --- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMFPModelCreator.java +++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCreator.java @@ -29,7 +29,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; * * @author John Keeney (John.Keeney@ericsson.com) */ -public abstract class TestMFPModelCreator implements TestApexModelCreator<AxPolicyModel> { +public abstract class TestMfpModelCreator implements TestApexModelCreator<AxPolicyModel> { /* * (non-Javadoc) @@ -74,7 +74,7 @@ public abstract class TestMFPModelCreator implements TestApexModelCreator<AxPoli /** * Create the MyFirstPolicyModel #1. */ - public static class TestMFP1ModelCreator extends TestMFPModelCreator { + public static class TestMfp1ModelCreator extends TestMfpModelCreator { /* * (non-Javadoc) @@ -90,7 +90,7 @@ public abstract class TestMFPModelCreator implements TestApexModelCreator<AxPoli /** * Create the MyFirstPolicyModel#2. */ - public static class TestMFP2ModelCreator extends TestMFPModelCreator { + public static class TestMfp2ModelCreator extends TestMfpModelCreator { /* * (non-Javadoc) 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 1068a5398..0d6328286 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 @@ -57,7 +57,7 @@ import org.onap.policy.common.utils.resources.ResourceUtils; /** * Test MyFirstPolicy Use Case. */ -public class TestMFPUseCase { +public class TestMfpUseCase { // CHECKSTYLE:OFF: MagicNumber private static ApexEngineImpl apexEngine; @@ -66,7 +66,7 @@ public class TestMFPUseCase { * Test MFP use case setup. */ @BeforeClass - public static void testMFPUseCaseSetup() { + public static void testMfpUseCaseSetup() { final AxArtifactKey key = new AxArtifactKey("MyFirstPolicyApexEngine", "0.0.1"); apexEngine = (ApexEngineImpl) new ApexEngineFactory().createApexEngine(key); } @@ -122,7 +122,7 @@ public class TestMFPUseCase { * @throws IOException Signals that an I/O exception has occurred. */ @Test - public void testMFP1Case() throws ApexException, InterruptedException, IOException { + public void testMfp1Case() throws ApexException, InterruptedException, IOException { final AxPolicyModel apexPolicyModel = new MFPDomainModelFactory().getMFP1PolicyModel(); assertNotNull(apexPolicyModel); @@ -170,7 +170,7 @@ public class TestMFPUseCase { * @throws IOException Signals that an I/O exception has occurred. */ @Test - public void testMFP2Case() throws ApexException, InterruptedException, IOException { + public void testMfp2Case() throws ApexException, InterruptedException, IOException { final AxPolicyModel apexPolicyModel = new MFPDomainModelFactory().getMFP2PolicyModel(); assertNotNull(apexPolicyModel); |