summaryrefslogtreecommitdiffstats
path: root/context/context-management/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-10 17:05:36 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-10 17:07:47 +0100
commitd100854291559df1426ea1e64351872ae2d3867b (patch)
tree78baab90111307cd3d2460b2cca37e93a20ac9a3 /context/context-management/src/test
parent8f82d7adcb53b349e14d3b356bda03588a554f95 (diff)
Checkstyle changes for apex model
Fix checkstyle warnings in the apex mode and knock on changes. Issue-ID: POLICY-1034 Change-Id: I10537e4288e9cad5ef18165ed2cdc1d3ab3139c1 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'context/context-management/src/test')
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java15
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java2
2 files changed, 9 insertions, 8 deletions
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
index 0208b7a9c..25928716e 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/ContextAlbumImplTest.java
@@ -34,7 +34,7 @@ import org.onap.policy.apex.context.ContextAlbum;
import org.onap.policy.apex.context.ContextException;
import org.onap.policy.apex.context.ContextRuntimeException;
import org.onap.policy.apex.context.Distributor;
-import org.onap.policy.apex.context.impl.distribution.jvmlocal.JVMLocalDistributor;
+import org.onap.policy.apex.context.impl.distribution.jvmlocal.JvmLocalDistributor;
import org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters;
import org.onap.policy.apex.context.parameters.ContextParameterConstants;
import org.onap.policy.apex.context.parameters.ContextParameters;
@@ -57,7 +57,7 @@ public class ContextAlbumImplTest {
public static void prepareForTest() {
final ContextParameters contextParameters = new ContextParameters();
contextParameters.getLockManagerParameters()
- .setPluginClass("org.onap.policy.apex.context.impl.locking.jvmlocal.JVMLocalLockManager");
+ .setPluginClass("org.onap.policy.apex.context.impl.locking.jvmlocal.JvmLocalLockManager");
contextParameters.setName(ContextParameterConstants.MAIN_GROUP_NAME);
contextParameters.getDistributorParameters().setName(ContextParameterConstants.DISTRIBUTOR_GROUP_NAME);
@@ -76,6 +76,9 @@ public class ContextAlbumImplTest {
ParameterService.register(schemaParameters);
}
+ /**
+ * Clear down the test data.
+ */
@AfterClass
public static void cleanUpAfterTest() {
ParameterService.deregister(ContextParameterConstants.DISTRIBUTOR_GROUP_NAME);
@@ -107,7 +110,7 @@ public class ContextAlbumImplTest {
}
try {
- new ContextAlbumImpl(new AxContextAlbum(), new JVMLocalDistributor(), null);
+ new ContextAlbumImpl(new AxContextAlbum(), new JvmLocalDistributor(), null);
fail("this test should throw an exception");
} catch (IllegalArgumentException e) {
assertEquals("Album map may not be null", e.getMessage());
@@ -116,7 +119,7 @@ public class ContextAlbumImplTest {
}
try {
- new ContextAlbumImpl(new AxContextAlbum(), new JVMLocalDistributor(), new LinkedHashMap<String, Object>());
+ new ContextAlbumImpl(new AxContextAlbum(), new JvmLocalDistributor(), new LinkedHashMap<String, Object>());
fail("this test should throw an exception");
} catch (ApexRuntimeException e) {
assertEquals("Model for org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas "
@@ -138,7 +141,7 @@ public class ContextAlbumImplTest {
true, AxArtifactKey.getNullKey());
try {
- new ContextAlbumImpl(axContextAlbum, new JVMLocalDistributor(), new LinkedHashMap<String, Object>());
+ new ContextAlbumImpl(axContextAlbum, new JvmLocalDistributor(), new LinkedHashMap<String, Object>());
fail("this test should throw an exception");
} catch (ContextException e) {
assertEquals("could not initiate schema management for context album AxContextAlbum",
@@ -146,7 +149,7 @@ public class ContextAlbumImplTest {
}
axContextAlbum.setItemSchema(simpleStringSchema.getKey());
- Distributor distributor = new JVMLocalDistributor();
+ Distributor distributor = new JvmLocalDistributor();
distributor.init(axContextAlbum.getKey());
ContextAlbum album = new ContextAlbumImpl(axContextAlbum, distributor, new LinkedHashMap<String, Object>());
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
index a71ba3675..800a7011d 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperInstanceCreationTest.java
@@ -25,12 +25,10 @@ import static org.junit.Assert.fail;
import org.junit.AfterClass;
import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.apex.context.SchemaHelper;
import org.onap.policy.apex.context.impl.schema.SchemaHelperFactory;
import org.onap.policy.apex.context.parameters.ContextParameterConstants;
-import org.onap.policy.apex.context.parameters.ContextParameters;
import org.onap.policy.apex.context.parameters.SchemaParameters;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKey;