aboutsummaryrefslogtreecommitdiffstats
path: root/context/context-management
diff options
context:
space:
mode:
authorParshad Patel <pars.patel@samsung.com>2018-11-30 20:15:11 +0900
committerParshad Patel <pars.patel@samsung.com>2018-12-03 10:43:05 +0900
commit752af31947114d88a2994ee6435c94ed9643f76a (patch)
tree600d6530ca3a9b99a4cbb5c142835cbdda12e0a8 /context/context-management
parentfb7c89ebe2e682170b09275a5e531d0a49d70ada (diff)
Rename test classes in apex-pdp
Make test classes name consitence by adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1263 Change-Id: I1dc1a7f174660a90664ebdcff2ea79ed30aa465c Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'context/context-management')
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParametersTest.java6
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java10
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportBadJsonAdapter.java (renamed from context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/BadJsonAdapter.java)4
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportBaseClass.java (renamed from context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MyBaseClass.java)4
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonAdapter.java (renamed from context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonAdapter.java)2
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonDeserializer.java (renamed from context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonDeserializer.java)2
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonSerializer.java (renamed from context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonSerializer.java)4
-rw-r--r--context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportSubClass.java (renamed from context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MySubClass.java)4
8 files changed, 18 insertions, 18 deletions
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParametersTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParametersTest.java
index c0287bfe2..8735c922a 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParametersTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParametersTest.java
@@ -62,15 +62,15 @@ public class JavaSchemaHelperParametersTest {
assertFalse(pars.validate().isValid());
jsonPars.setAdaptedClass("java.lang.String");
- jsonPars.setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.TestJsonDeserializer");
+ jsonPars.setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.SupportJsonDeserializer");
assertFalse(pars.validate().isValid());
jsonPars.setAdaptedClass("java.lang.String");
- jsonPars.setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.TestJsonSerializer");
+ jsonPars.setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.SupportJsonSerializer");
assertFalse(pars.validate().isValid());
jsonPars.setAdaptedClass("java.lang.String");
- jsonPars.setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.TestJsonAdapter");
+ jsonPars.setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.SupportJsonAdapter");
assertTrue(pars.validate().isValid());
Map<String, JavaSchemaHelperJsonAdapterParameters> adapterMap = new LinkedHashMap<>();
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java
index c746198e7..16976f268 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperTest.java
@@ -52,7 +52,7 @@ public class JavaSchemaHelperTest {
JavaSchemaHelperJsonAdapterParameters stringAdapterPars = new JavaSchemaHelperJsonAdapterParameters();
stringAdapterPars.setAdaptedClass("java.lang.String");
- stringAdapterPars.setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.TestJsonAdapter");
+ stringAdapterPars.setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.SupportJsonAdapter");
javaSchemaHelperPars.getJsonAdapters().put("String", stringAdapterPars);
@@ -212,7 +212,7 @@ public class JavaSchemaHelperTest {
stringSchemaHelper.init(userKey, stringSchema);
AxContextSchema myBaseClassSchema = new AxContextSchema(schemaKey, "Java",
- "org.onap.policy.apex.context.impl.schema.java.MyBaseClass");
+ "org.onap.policy.apex.context.impl.schema.java.SupportBaseClass");
SchemaHelper myBaseClassSchemaHelper = new JavaSchemaHelper();
myBaseClassSchemaHelper.init(userKey, myBaseClassSchema);
@@ -315,7 +315,7 @@ public class JavaSchemaHelperTest {
assertEquals("123", stringSchemaHelper.unmarshal(123));
- MySubClass subClassInstance = new MySubClass("123");
+ SupportSubClass subClassInstance = new SupportSubClass("123");
assertEquals(subClassInstance, myBaseClassSchemaHelper.unmarshal(subClassInstance));
}
@@ -375,7 +375,7 @@ public class JavaSchemaHelperTest {
JavaSchemaHelperParameters javaShPars = (JavaSchemaHelperParameters) pars.getSchemaHelperParameterMap()
.get("Java");
javaShPars.getJsonAdapters().get("String")
- .setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.BadJsonAdapter");
+ .setAdaptorClass("org.onap.policy.apex.context.impl.schema.java.SupportBadJsonAdapter");
AxContextSchema stringSchema = new AxContextSchema(schemaKey, "Java", "java.lang.String");
SchemaHelper stringSchemaHelper = new JavaSchemaHelper();
@@ -386,7 +386,7 @@ public class JavaSchemaHelperTest {
fail("test should throw an exception");
} catch (ContextRuntimeException pre) {
assertEquals("UserKey:0.0.1: instantiation of adapter class "
- + "\"org.onap.policy.apex.context.impl.schema.java.BadJsonAdapter\" "
+ + "\"org.onap.policy.apex.context.impl.schema.java.SupportBadJsonAdapter\" "
+ "to decode and encode class \"java.lang.String\" failed: Test for Bad Adapter",
pre.getMessage());
}
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/BadJsonAdapter.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportBadJsonAdapter.java
index fef69ac33..e45eb9aa3 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/BadJsonAdapter.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportBadJsonAdapter.java
@@ -35,10 +35,10 @@ import java.lang.reflect.Type;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class BadJsonAdapter
+public class SupportBadJsonAdapter
implements JsonSerializer<String>, JsonDeserializer<String> {
- public BadJsonAdapter() throws IllegalAccessException {
+ public SupportBadJsonAdapter() throws IllegalAccessException {
throw new IllegalAccessException("Test for Bad Adapter");
}
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MyBaseClass.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportBaseClass.java
index 6dd6e2527..004737559 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MyBaseClass.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportBaseClass.java
@@ -20,10 +20,10 @@
package org.onap.policy.apex.context.impl.schema.java;
-public class MyBaseClass {
+public class SupportBaseClass {
final String stringField;
- public MyBaseClass(final String stringField) {
+ public SupportBaseClass(final String stringField) {
this.stringField = stringField;
}
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonAdapter.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonAdapter.java
index 89dfb4c2d..5c26beaee 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonAdapter.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonAdapter.java
@@ -34,7 +34,7 @@ import java.lang.reflect.Type;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class TestJsonAdapter implements JsonSerializer<String>, JsonDeserializer<String> {
+public class SupportJsonAdapter implements JsonSerializer<String>, JsonDeserializer<String> {
/**
* {@inheritDoc}
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonDeserializer.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonDeserializer.java
index 463945872..be279bf52 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonDeserializer.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonDeserializer.java
@@ -32,7 +32,7 @@ import java.lang.reflect.Type;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class TestJsonDeserializer implements JsonDeserializer<String> {
+public class SupportJsonDeserializer implements JsonDeserializer<String> {
/**
* {@inheritDoc}
*/
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonSerializer.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonSerializer.java
index d58be6069..1fcb858ab 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/TestJsonSerializer.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportJsonSerializer.java
@@ -35,8 +35,8 @@ import org.slf4j.ext.XLoggerFactory;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class TestJsonSerializer implements JsonSerializer<String> {
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(TestJsonSerializer.class);
+public class SupportJsonSerializer implements JsonSerializer<String> {
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(SupportJsonSerializer.class);
/**
* {@inheritDoc}
diff --git a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MySubClass.java b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportSubClass.java
index f68bcf4dc..260f4eb8c 100644
--- a/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/MySubClass.java
+++ b/context/context-management/src/test/java/org/onap/policy/apex/context/impl/schema/java/SupportSubClass.java
@@ -20,8 +20,8 @@
package org.onap.policy.apex.context.impl.schema.java;
-public class MySubClass extends MyBaseClass {
- public MySubClass(String stringField) {
+public class SupportSubClass extends SupportBaseClass {
+ public SupportSubClass(String stringField) {
super(stringField);
}
}