aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditorTest.java (renamed from auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CliCodegenTest.java)6
-rw-r--r--auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java (renamed from auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/StErrorListener.java)2
-rw-r--r--auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportGenerationTester.java (renamed from auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/GenerationTest.java)6
-rw-r--r--auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportKeyInfoGetter.java (renamed from auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/KeyInfoGetter.java)4
-rw-r--r--client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/BeansTest.java2
-rw-r--r--client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/DummyBeanBase.java (renamed from client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/BeanFake.java)2
-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
14 files changed, 29 insertions, 29 deletions
diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CliCodegenTest.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditorTest.java
index 5433f2d15..e1bf3b298 100644
--- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CliCodegenTest.java
+++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/CodeGeneratorCliEditorTest.java
@@ -59,9 +59,9 @@ import org.stringtemplate.v4.ST;
/**
* Test CLI code generation.
*/
-public class CliCodegenTest {
+public class CodeGeneratorCliEditorTest {
- private KeyInfoGetter kig;
+ private SupportKeyInfoGetter kig;
private File outFile = null;
@Test
@@ -96,7 +96,7 @@ public class CliCodegenTest {
* @throws IOException on generation exceptions
*/
private int generateCli(final CodeGeneratorCliEditor codeGen, final AxPolicyModel policyModel) throws IOException {
- kig = new KeyInfoGetter(policyModel);
+ kig = new SupportKeyInfoGetter(policyModel);
// Order is important. 0: model, 1: context schemas, 2: tasks, 3: events, 4: ContextAlbums, 5: Policies
// 0: model
diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/StErrorListener.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java
index 28e32bca6..33387accc 100644
--- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/StErrorListener.java
+++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java
@@ -28,7 +28,7 @@ import org.stringtemplate.v4.misc.STMessage;
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
-public class StErrorListener implements STErrorListener {
+public class DummyStErrorListener implements STErrorListener {
/** Counts errors of the listener. */
private int errorCount;
diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/GenerationTest.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportGenerationTester.java
index 3b79e805c..9d91f8f68 100644
--- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/GenerationTest.java
+++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportGenerationTester.java
@@ -39,7 +39,7 @@ import org.stringtemplate.v4.STGroupFile;
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
-public class GenerationTest {
+public class SupportGenerationTester {
/**
* Get the chunks for the codegen.
@@ -90,7 +90,7 @@ public class GenerationTest {
/** Test STG load. */
@Test
public void testGenerationLoad() {
- final StErrorListener errListener = new StErrorListener();
+ final DummyStErrorListener errListener = new DummyStErrorListener();
final STGroupFile stg = new STGroupFile(CodeGeneratorCliEditor.STG_FILE);
stg.setListener(errListener);
@@ -101,7 +101,7 @@ public class GenerationTest {
/** Test STG chunks. */
@Test
public void testGenerationChunks() {
- final StErrorListener errListener = new StErrorListener();
+ final DummyStErrorListener errListener = new DummyStErrorListener();
final STGroupFile stg = new STGroupFile(CodeGeneratorCliEditor.STG_FILE);
stg.setListener(errListener);
diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/KeyInfoGetter.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportKeyInfoGetter.java
index 97d05679c..5547aa4f7 100644
--- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/KeyInfoGetter.java
+++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportKeyInfoGetter.java
@@ -31,7 +31,7 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
* @author John Keeney (john.keeney@ericsson.com)
*/
-public class KeyInfoGetter {
+public class SupportKeyInfoGetter {
/** The policy model for the getters. */
private final AxPolicyModel model;
@@ -41,7 +41,7 @@ public class KeyInfoGetter {
*
* @param model the policy model to use
*/
- public KeyInfoGetter(final AxPolicyModel model) {
+ public SupportKeyInfoGetter(final AxPolicyModel model) {
this.model = model;
}
diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/BeansTest.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/BeansTest.java
index 2cae7703d..ba773b1ac 100644
--- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/BeansTest.java
+++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/BeansTest.java
@@ -56,7 +56,7 @@ public class BeansTest {
final BeanEvent beanEvent = new BeanEvent();
assertNull(beanEvent.get("name"));
- final BeanFake beanFake = new BeanFake();
+ final DummyBeanBase beanFake = new DummyBeanBase();
assertNull(beanFake.get("name"));
assertNull(beanFake.get("field1"));
diff --git a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/BeanFake.java b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/DummyBeanBase.java
index 958f1a6cd..25a10e269 100644
--- a/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/BeanFake.java
+++ b/client/client-editor/src/test/java/org/onap/policy/apex/client/editor/rest/handling/bean/DummyBeanBase.java
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlType;
* The Event Bean.
*/
@XmlType
-public class BeanFake extends BeanBase {
+public class DummyBeanBase extends BeanBase {
private String name = null;
private String version = null;
private String field1 = null;
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);
}
}