aboutsummaryrefslogtreecommitdiffstats
path: root/aai-core/src/test
diff options
context:
space:
mode:
authorVenkata Harish K Kajur <vk250x@att.com>2018-01-30 14:04:13 -0500
committerVenkata Harish K Kajur <vk250x@att.com>2018-02-27 19:35:30 -0500
commitaefeb9ff5ec5c7ce3c20f420db1116c31f034615 (patch)
tree986dc4e1c6f8b897b3e6e99fba2af8df3a3f0965 /aai-core/src/test
parent4eae7a8de0381e013daa717626c6c431d1dca35b (diff)
Update the files for ajsc 6 changes
Issue-ID: AAI-33 Change-Id: I897566e79eb7505232b692e551f6347e69fafed6 Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
Diffstat (limited to 'aai-core/src/test')
-rw-r--r--aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java2
-rw-r--r--aai-core/src/test/java/org/onap/aai/util/AAICSVWriterTest.java77
-rw-r--r--aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java2
-rw-r--r--aai-core/src/test/resources/oxm/aai_oxm_v10.xml (renamed from aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v10.xml)0
-rw-r--r--aai-core/src/test/resources/oxm/aai_oxm_v11.xml (renamed from aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v11.xml)0
-rw-r--r--aai-core/src/test/resources/oxm/aai_oxm_v12.xml (renamed from aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v12.xml)14
-rw-r--r--aai-core/src/test/resources/oxm/aai_oxm_v8.xml (renamed from aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v8.xml)0
-rw-r--r--aai-core/src/test/resources/oxm/aai_oxm_v9.xml (renamed from aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v9.xml)0
-rw-r--r--aai-core/src/test/resources/oxm/sideeffect/nested-case.json (renamed from aai-core/src/test/resources/bundleconfig-local/etc/oxm/sideeffect/nested-case.json)0
9 files changed, 9 insertions, 86 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java b/aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java
index 7d3cafac..65a241f0 100644
--- a/aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java
+++ b/aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java
@@ -261,7 +261,7 @@ public class DataCopyTest {
private String getJsonString(String filename) throws IOException {
- FileInputStream is = new FileInputStream("src/test/resources/bundleconfig-local/etc/oxm/sideeffect/" + filename);
+ FileInputStream is = new FileInputStream("src/test/resources/oxm/sideeffect/" + filename);
String s = IOUtils.toString(is, "UTF-8");
IOUtils.closeQuietly(is);
diff --git a/aai-core/src/test/java/org/onap/aai/util/AAICSVWriterTest.java b/aai-core/src/test/java/org/onap/aai/util/AAICSVWriterTest.java
deleted file mode 100644
index b149e95f..00000000
--- a/aai-core/src/test/java/org/onap/aai/util/AAICSVWriterTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * ============LICENSE_START=======================================================
- * org.onap.aai
- * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
- */
-package org.onap.aai.util;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class AAICSVWriterTest {
-
- private final String TEMP_DIR=System.getProperty("java.io.tmpdir")+"/test.csv";
-
- @Test
- public void writeFile() throws IOException
- {
-
-
- FileWriter fileWriter = new FileWriter(TEMP_DIR);
- AAICSVWriter aaicsvWriter = new AAICSVWriter(fileWriter, ",", '\'', null);
- aaicsvWriter.writeColumn(new String[]{"id", "name", null});
- aaicsvWriter.writeColumn(null);
- aaicsvWriter.writeNext(new String[]{"1", "Test1"}, true);
- aaicsvWriter.writeNext(new String[]{"1", "Test1"});
- aaicsvWriter.writeNext(new String[]{"1", "Test1"});
- aaicsvWriter.writeNext(new String[]{"1", "Test@"}, false);
- aaicsvWriter.writeNext(new String[]{"1", "Test1"});
- aaicsvWriter.writeNext(new String[]{"1", "Test1"});
- aaicsvWriter.writeNext(new String[]{"1", "Test1"});
- aaicsvWriter.writeNext(new String[]{"1", "Test1"});
- aaicsvWriter.writeNext(new String[]{"1", "Test1"});
- aaicsvWriter.writeNext(new String[]{"1", null});
- aaicsvWriter.writeNext(null);
- aaicsvWriter.close();
- File file = new File(TEMP_DIR);
- Assert.assertTrue("File shoud be exists", file.exists());
- }
-
- @Test
- public void writeFile1() throws IOException
- {
- FileWriter fileWriter = new FileWriter(TEMP_DIR);
- AAICSVWriter aaicsvWriter = new AAICSVWriter(fileWriter, ",", '\u0000', null);
- aaicsvWriter.writeNext(new String[]{"1", "Test1"}, true);
- aaicsvWriter.writeNext(new String[]{"1", "Tes\"t@"}, false);
- aaicsvWriter.writeNext(new String[]{"1", "Tes\t@"}, false);
- aaicsvWriter.writeNext(new String[]{"1", "Test,@"}, false);
- aaicsvWriter.writeNext(new String[]{"1", "Tes\n"}, false);
- aaicsvWriter.writeNext(new String[]{"1", "Tes\r"}, false);
- aaicsvWriter.writeNext(new String[]{"1", "Tes\u0000"}, false);
- aaicsvWriter.close();
- File file = new File(TEMP_DIR);
- Assert.assertTrue("File shoud be exists", file.exists());
-
- }
-}
diff --git a/aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java b/aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java
index 5c87b29e..0050c101 100644
--- a/aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java
+++ b/aai-core/src/test/java/org/onap/aai/util/StoreNotificationEventTest.java
@@ -151,7 +151,7 @@ public class StoreNotificationEventTest extends AAISetup {
DynamicEntity obj = Mockito.mock(DynamicEntity.class);
DynamicJAXBContext notificationJaxbContext = Mockito.mock(DynamicJAXBContext.class);
ClassLoader cl = getClass().getClassLoader();
- InputStream is = cl.getResourceAsStream("bundleconfig-local/etc/oxm/aai_oxm_v11.xml");
+ InputStream is = cl.getResourceAsStream("oxm/aai_oxm_v11.xml");
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, is);
DynamicJAXBContext notificationJaxbContextReal = DynamicJAXBContextFactory.createContextFromOXM(cl, properties);
diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v10.xml b/aai-core/src/test/resources/oxm/aai_oxm_v10.xml
index 51eaa349..51eaa349 100644
--- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v10.xml
+++ b/aai-core/src/test/resources/oxm/aai_oxm_v10.xml
diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v11.xml b/aai-core/src/test/resources/oxm/aai_oxm_v11.xml
index 90d023ce..90d023ce 100644
--- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v11.xml
+++ b/aai-core/src/test/resources/oxm/aai_oxm_v11.xml
diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v12.xml b/aai-core/src/test/resources/oxm/aai_oxm_v12.xml
index 2364cf82..4eff665e 100644
--- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v12.xml
+++ b/aai-core/src/test/resources/oxm/aai_oxm_v12.xml
@@ -5139,13 +5139,13 @@
</xml-properties>
<xml-root-element name="reserved-prop-names" />
<java-attributes>
- <xml-element java-attribute="lastModSourceOfTruth" name="last-mod-source-of-truth" type="java.lang.String" />
- <xml-element java-attribute="aaiNodeType" name="aai-node-type" type="java.lang.String" />
- <xml-element java-attribute="aaiCreatedTs" name="aai-created-ts" type="java.lang.Long" />
- <xml-element java-attribute="aaiUniqueKey" name="aai-unique-key" type="java.lang.String" />
- <xml-element java-attribute="aaiLastModTs" name="aai-last-mod-ts" type="java.lang.Long" />
- <xml-element java-attribute="sourceOfTruth" name="source-of-truth" type="java.lang.String" />
- <xml-element java-attribute="aaiUri" name="aai-uri" type="java.lang.String" />
+ <xml-element java-attribute="edgeLabel" name="edgeLabel" type="java.lang.String" />
+ <xml-element java-attribute="direction" name="direction" type="java.lang.String" />
+ <xml-element java-attribute="multiplicityRule" name="multiplicityRule" type="java.lang.String" />
+ <xml-element java-attribute="containsOtherV" name="contains-other-v" type="java.lang.String" />
+ <xml-element java-attribute="deleteOtherV" name="delete-other-v" type="java.lang.String" />
+ <xml-element java-attribute="svcinfra" name="SVC-INFRA" type="java.lang.String" />
+ <xml-element java-attribute="preventDelete" name="prevent-delete" type="java.lang.String" />
</java-attributes>
</java-type>
<java-type name="EdgePropNames">
diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v8.xml b/aai-core/src/test/resources/oxm/aai_oxm_v8.xml
index d666b738..d666b738 100644
--- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v8.xml
+++ b/aai-core/src/test/resources/oxm/aai_oxm_v8.xml
diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v9.xml b/aai-core/src/test/resources/oxm/aai_oxm_v9.xml
index ecffb2fc..ecffb2fc 100644
--- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/aai_oxm_v9.xml
+++ b/aai-core/src/test/resources/oxm/aai_oxm_v9.xml
diff --git a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/sideeffect/nested-case.json b/aai-core/src/test/resources/oxm/sideeffect/nested-case.json
index 40a0493a..40a0493a 100644
--- a/aai-core/src/test/resources/bundleconfig-local/etc/oxm/sideeffect/nested-case.json
+++ b/aai-core/src/test/resources/oxm/sideeffect/nested-case.json