aboutsummaryrefslogtreecommitdiffstats
path: root/aai-core/src/test/java
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/java
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/java')
-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
3 files changed, 2 insertions, 79 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);