aboutsummaryrefslogtreecommitdiffstats
path: root/auth/cli-editor/src
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-07-06 13:39:39 +0000
committerGerrit Code Review <gerrit@onap.org>2018-07-06 13:39:39 +0000
commit000291ee3624776e193411ef21c119e671be7011 (patch)
tree02e64e1fcb69d187a2c6a2619e72cba27dbc739f /auth/cli-editor/src
parent6bc18bc966bc9448505e55dec9ee11a8cea9a38c (diff)
parent3f300de4a4ab68feef455e43b18cac804323fd8e (diff)
Merge "Refactoring existing integration tests"
Diffstat (limited to 'auth/cli-editor/src')
-rw-r--r--auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex28
-rw-r--r--auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex32
-rw-r--r--auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java8
3 files changed, 34 insertions, 34 deletions
diff --git a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex
index 265f92415..9f62eca74 100644
--- a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex
+++ b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyAvroEventContext.apex
@@ -82,7 +82,7 @@ LE
schema create name=CustomBoolean_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem000",
+ "name" : "TestContextBooleanItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "flag", "type": "boolean"}
@@ -93,7 +93,7 @@ LE
schema create name=CustomByte_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem001",
+ "name" : "TestContextByteItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "byteValue", "type": "int"}
@@ -104,7 +104,7 @@ LE
schema create name=CustomInteger_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem002",
+ "name" : "TestContextIntItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "intValue", "type": "int"}
@@ -115,7 +115,7 @@ LE
schema create name=CustomLong_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem003",
+ "name" : "TestContextLongItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "longValue", "type": "long"}
@@ -126,7 +126,7 @@ LE
schema create name=CustomFloat_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem004",
+ "name" : "TestContextFloatItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "floatValue", "type": "float"}
@@ -137,7 +137,7 @@ LE
schema create name=CustomDouble_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem005",
+ "name" : "TestContextDoubleItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "doubleValue", "type": "double"}
@@ -148,7 +148,7 @@ LE
schema create name=CustomString_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem006",
+ "name" : "TestContextStringItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "stringValue", "type": "string"}
@@ -159,7 +159,7 @@ LE
schema create name=CustomALong_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem007",
+ "name" : "TestContextLongObjectItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "longValue", "type": "long"}
@@ -170,7 +170,7 @@ LE
schema create name=CustomDate0_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem008",
+ "name" : "TestContextDateItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "time" , "type": "long"},
@@ -188,7 +188,7 @@ LE
schema create name=CustomDate1_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem009",
+ "name" : "TestContextDateTzItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "dateValue" , "type": {
@@ -216,12 +216,12 @@ LE
schema create name=CustomDate2_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem00A",
+ "name" : "TestContextDateLocaleItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "dateValue" , "type": {
"type" : "record",
- "name" : "TestContextItem008",
+ "name" : "TestContextDateItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "time" , "type": "long"},
@@ -247,7 +247,7 @@ LE
schema create name=CustomSet_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem00B",
+ "name" : "TestContextTreeSetItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "setValue", "type": {
@@ -261,7 +261,7 @@ LE
schema create name=CustomMap_type flavour=Avro schema=LS
{
"type" : "record",
- "name" : "TestContextItem00C",
+ "name" : "TestContextTreeMapItem",
"namespace" : "org.onap.policy.apex.context.test.avro.concepts",
"fields" : [
{"name": "mapValue", "type": {
diff --git a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex
index 8d1711638..e978f15bb 100644
--- a/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex
+++ b/auth/cli-editor/src/main/resources/examples/scripts/TestPolicyJavaEventContext.apex
@@ -28,19 +28,19 @@ schema create name=JavaLong_type flavour=Java schema=java.lang.Long
schema create name=JavaFloat_type flavour=Java schema=java.lang.Float
schema create name=JavaDouble_type flavour=Java schema=java.lang.Double
schema create name=JavaString_type flavour=Java schema=java.lang.String
-schema create name=CustomBoolean_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem000
-schema create name=CustomByte_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem001
-schema create name=CustomInteger_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem002
-schema create name=CustomLong_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem003
-schema create name=CustomFloat_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem004
-schema create name=CustomDouble_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem005
-schema create name=CustomString_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem006
-schema create name=CustomJLong_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem007
-schema create name=CustomDate0_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem008
-schema create name=CustomDate1_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem009
-schema create name=CustomDate2_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00A
-schema create name=CustomSet_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00B
-schema create name=CustomMap_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextItem00C
+schema create name=CustomBoolean_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextBooleanItem
+schema create name=CustomByte_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextByteItem
+schema create name=CustomInteger_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextIntItem
+schema create name=CustomLong_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextLongItem
+schema create name=CustomFloat_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextFloatItem
+schema create name=CustomDouble_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextDoubleItem
+schema create name=CustomString_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextStringItem
+schema create name=CustomJLong_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextLongObjectItem
+schema create name=CustomDate0_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextDateItem
+schema create name=CustomDate1_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextDateTzItem
+schema create name=CustomDate2_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem
+schema create name=CustomSet_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextTreeSetItem
+schema create name=CustomMap_type flavour=Java schema=org.onap.policy.apex.context.test.concepts.TestContextTreeMapItem
event create name=Test_InputEvent nameSpace=org.onap.policy.apex.test source=External target=Apex
@@ -247,14 +247,14 @@ customDouble .setDoubleValue(customDouble .getDoubleValue() + 1);
customString .setStringValue(customString .getStringValue() + " added to end of string");
customJLong .setLongValue (customJLong .getLongValue() + 1);
-customDate0Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem008");
+customDate0Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextDateItem");
customDate0 = new customDate0Type(1499868391);
-customDate1Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem009");
+customDate1Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextDateTzItem");
customDate1 = new customDate1Type();
customDate1.setDateValue(customDate0);
-customDate2Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextItem00A");
+customDate2Type = Java.type("org.onap.policy.apex.context.test.concepts.TestContextDateLocaleItem");
customDate2 = new customDate2Type();
customDate2.setDateValue(customDate0);
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java
index 6e489ad32..bd75ddf76 100644
--- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java
+++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/TestCLIEditorEventsContext.java
@@ -84,8 +84,8 @@ public class TestCLIEditorEventsContext {
final int logCharCount = logString.replaceAll(SPACES, EMPTY_STRING).length();
final int modelCharCount = modelString.replaceAll(SPACES, EMPTY_STRING).length();
- assertEquals(25911, logCharCount);
- assertEquals(46138, modelCharCount);
+ assertEquals(25962, logCharCount);
+ assertEquals(46189, modelCharCount);
}
/**
@@ -114,8 +114,8 @@ public class TestCLIEditorEventsContext {
final int logCharCount = logString.replaceAll(SPACES, EMPTY_STRING).length();
final int modelCharCount = modelString.replaceAll(SPACES, EMPTY_STRING).length();
- assertEquals(30366, logCharCount);
- assertEquals(52981, modelCharCount);
+ assertEquals(30407, logCharCount);
+ assertEquals(53022, modelCharCount);
}