summaryrefslogtreecommitdiffstats
path: root/model/policy-model/src/test/java/org
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2018-12-15 09:47:58 +0000
committerliamfallon <liam.fallon@est.tech>2018-12-15 09:48:04 +0000
commit8e8f3458646ec97d058d7322917f56021de2dc7f (patch)
treeb549a654cba7d87249751f85cf6b23d3b2b4cc48 /model/policy-model/src/test/java/org
parent4b01ae1ca8bc592fbbbc4d5408d6c645487811dd (diff)
Fix sonar test renaming issues
Renaming tests introduced Sonar issues: - Tests where coverage was <80% flagged as they are new code - Support test classes with names ending in "Test" flagged becasue they did not contain test cases Issue-ID: POLICY-1263 Change-Id: I17a4b27b2952a4978fab1c76579a013478b60ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'model/policy-model/src/test/java/org')
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java4
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java2
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java2
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java2
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelMergerTest.java6
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java2
-rw-r--r--model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java (renamed from model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelCreatorTest.java)2
8 files changed, 12 insertions, 12 deletions
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java
index edf045a06..e1264e887 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PoliciesTest.java
@@ -41,7 +41,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicy;
import org.onap.policy.apex.model.policymodel.concepts.AxState;
import org.onap.policy.apex.model.policymodel.concepts.AxStateOutput;
import org.onap.policy.apex.model.policymodel.concepts.AxStateTree;
-import org.onap.policy.apex.model.policymodel.handling.ApexPolicyModelCreatorTest;
+import org.onap.policy.apex.model.policymodel.handling.SupportApexPolicyModelCreator;
/**
* Test apex policies.
@@ -113,7 +113,7 @@ public class PoliciesTest {
assertEquals("PolicyName:0.0.1", policy.getKeys().get(0).getId());
- policy = new ApexPolicyModelCreatorTest().getModel().getPolicies().get("policy");
+ policy = new SupportApexPolicyModelCreator().getModel().getPolicies().get("policy");
AxValidationResult result = new AxValidationResult();
result = policy.validate(result);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
index e1f1f90c3..6c93efde0 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/concepts/PolicyModelTest.java
@@ -46,7 +46,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxStateTaskOutputType;
import org.onap.policy.apex.model.policymodel.concepts.AxStateTaskReference;
import org.onap.policy.apex.model.policymodel.concepts.AxTaskSelectionLogic;
import org.onap.policy.apex.model.policymodel.concepts.AxTasks;
-import org.onap.policy.apex.model.policymodel.handling.ApexPolicyModelCreatorTest;
+import org.onap.policy.apex.model.policymodel.handling.SupportApexPolicyModelCreator;
/**
* Test policy models.
@@ -148,7 +148,7 @@ public class PolicyModelTest {
new AxKeyInformation(keyInfoKey), new AxEvents(eventsKey), new AxContextAlbums(albumsKey),
new AxTasks(tasksKey), new AxPolicies(policiesKey))));
- model = new ApexPolicyModelCreatorTest().getModel();
+ model = new SupportApexPolicyModelCreator().getModel();
AxValidationResult result = new AxValidationResult();
result = model.validate(result);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java
index 997664b13..7a240e18b 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelTest.java
@@ -49,7 +49,7 @@ public class ApexPolicyModelTest {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
connection = DriverManager.getConnection("jdbc:derby:memory:apex_test;create=true");
- testApexModel = new TestApexModel<AxPolicyModel>(AxPolicyModel.class, new ApexPolicyModelCreatorTest());
+ testApexModel = new TestApexModel<AxPolicyModel>(AxPolicyModel.class, new SupportApexPolicyModelCreator());
}
@After
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java
index 425509d3a..d4ab6bd7b 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyAnalyserTest.java
@@ -31,7 +31,7 @@ import org.onap.policy.apex.model.policymodel.handling.PolicyAnalysisResult;
public class PolicyAnalyserTest {
@Test
public void test() {
- final AxPolicyModel apexModel = new ApexPolicyModelCreatorTest().getModel();
+ final AxPolicyModel apexModel = new SupportApexPolicyModelCreator().getModel();
final PolicyAnalyser policyAnalyser = new PolicyAnalyser();
final PolicyAnalysisResult analysisResult = policyAnalyser.analyse(apexModel);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java
index 08d00e628..8b0396bc2 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelComparerTest.java
@@ -39,7 +39,7 @@ public class PolicyModelComparerTest {
@Test
public void testPolicyComparer() throws IOException {
- final AxPolicyModel leftApexModel = new ApexPolicyModelCreatorTest().getModel();
+ final AxPolicyModel leftApexModel = new SupportApexPolicyModelCreator().getModel();
final AxPolicyModel rightApexModel = new AxPolicyModel(leftApexModel);
PolicyModelComparer policyModelComparer = new PolicyModelComparer(leftApexModel, rightApexModel);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelMergerTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelMergerTest.java
index 7d5ba6a40..b477c47cd 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelMergerTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelMergerTest.java
@@ -39,8 +39,8 @@ public class PolicyModelMergerTest {
@Test
public void testPolicyModelMerger() {
- final AxPolicyModel leftPolicyModel = new ApexPolicyModelCreatorTest().getModel();
- AxPolicyModel rightPolicyModel = new ApexPolicyModelCreatorTest().getModel();
+ final AxPolicyModel leftPolicyModel = new SupportApexPolicyModelCreator().getModel();
+ AxPolicyModel rightPolicyModel = new SupportApexPolicyModelCreator().getModel();
try {
final AxPolicyModel mergedPolicyModel = PolicyModelMerger.getMergedPolicyModel(leftPolicyModel,
@@ -99,7 +99,7 @@ public class PolicyModelMergerTest {
fail("test should not throw an exception");
}
- rightPolicyModel = new ApexPolicyModelCreatorTest().getAnotherModel();
+ rightPolicyModel = new SupportApexPolicyModelCreator().getAnotherModel();
try {
final AxPolicyModel mergedPolicyModel = PolicyModelMerger.getMergedPolicyModel(leftPolicyModel,
rightPolicyModel, true);
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java
index 29e7307f4..c20a40736 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/PolicyModelSplitterTest.java
@@ -37,7 +37,7 @@ import org.onap.policy.apex.model.policymodel.handling.PolicyModelSplitter;
public class PolicyModelSplitterTest {
@Test
public void test() {
- final AxPolicyModel apexModel = new ApexPolicyModelCreatorTest().getModel();
+ final AxPolicyModel apexModel = new SupportApexPolicyModelCreator().getModel();
final Set<AxArtifactKey> requiredPolicySet = new TreeSet<AxArtifactKey>();
requiredPolicySet.add(new AxArtifactKey("policy", "0.0.1"));
diff --git a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelCreatorTest.java b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java
index 604d8c3bc..b2c49b6b4 100644
--- a/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/ApexPolicyModelCreatorTest.java
+++ b/model/policy-model/src/test/java/org/onap/policy/apex/model/policymodel/handling/SupportApexPolicyModelCreator.java
@@ -56,7 +56,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxTasks;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class ApexPolicyModelCreatorTest implements TestApexModelCreator<AxPolicyModel> {
+public class SupportApexPolicyModelCreator implements TestApexModelCreator<AxPolicyModel> {
@Override
public AxPolicyModel getModel() {