summaryrefslogtreecommitdiffstats
path: root/aai-core/src/test/java
diff options
context:
space:
mode:
authorKajur, Harish (vk250x) <vk250x@att.com>2018-12-13 09:02:53 -0500
committerKajur, Harish (vk250x) <vk250x@att.com>2018-12-17 01:49:35 -0500
commite47092116ce15474412506a967f009a28ee396eb (patch)
treef5561b061dde1b876d19b549db4895817e3b117b /aai-core/src/test/java
parente42c7cf9d25b5a5ec3e3bf2cbb5e04441ec45359 (diff)
Update aai-core use new schema ingest library
Issue-ID: AAI-2003 Change-Id: I9234b6b594e559b58e445a97b78a4658190e6527 Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
Diffstat (limited to 'aai-core/src/test/java')
-rw-r--r--aai-core/src/test/java/org/onap/aai/AAISetup.java47
-rw-r--r--aai-core/src/test/java/org/onap/aai/query/builder/QueryBuilderTestAbstraction.java4
-rw-r--r--aai-core/src/test/java/org/onap/aai/query/builder/QueryTestsConfigTranslator.java3
-rw-r--r--aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializer_needsFakeRulesTest.java4
4 files changed, 34 insertions, 24 deletions
diff --git a/aai-core/src/test/java/org/onap/aai/AAISetup.java b/aai-core/src/test/java/org/onap/aai/AAISetup.java
index b7a4f740..ce8dfe20 100644
--- a/aai-core/src/test/java/org/onap/aai/AAISetup.java
+++ b/aai-core/src/test/java/org/onap/aai/AAISetup.java
@@ -59,7 +59,7 @@ import org.springframework.test.context.junit4.rules.SpringMethodRule;
IntrospectionConfig.class,
RestBeanConfig.class
})
-@TestPropertySource(properties = { "schema.uri.base.path = /aai" })
+@TestPropertySource(properties = { "schema.uri.base.path = /aai", "schema.xsd.maxoccurs = 5000" , "schema.translator.list=config"})
public abstract class AAISetup {
@ClassRule
@@ -69,26 +69,29 @@ public abstract class AAISetup {
public final SpringMethodRule springMethodRule = new SpringMethodRule();
@Autowired
- protected Map<SchemaVersion, MoxyLoader> moxyLoaderInstance;
-
- @Autowired
- protected HttpEntry traversalHttpEntry;
-
- @Autowired
- protected HttpEntry traversalUriHttpEntry;
-
- @Autowired
- protected NodeIngestor nodeIngestor;
-
- @Autowired
- protected LoaderFactory loaderFactory;
+ protected Map<SchemaVersion, MoxyLoader> moxyLoaderInstance;
+
+ @Autowired
+ protected HttpEntry traversalHttpEntry;
+
+ @Autowired
+ protected HttpEntry traversalUriHttpEntry;
+
+ @Autowired
+ protected NodeIngestor nodeIngestor;
+
+ @Autowired
+ protected LoaderFactory loaderFactory;
- @Autowired
- protected SchemaVersions schemaVersions;
+ @Autowired
+ protected SchemaVersions schemaVersions;
+
+ @Value("${schema.uri.base.path}")
+ protected String basePath;
- @Value("${schema.uri.base.path}")
- protected String basePath;
-
+ @Value("${schema.xsd.maxoccurs}")
+ protected String maxOccurs;
+
protected static final String SERVICE_NAME = "JUNIT";
@BeforeClass
@@ -98,7 +101,7 @@ public abstract class AAISetup {
System.setProperty("aai.service.name", SERVICE_NAME);
QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/bundleconfig-local/etc/oxm/");
}
-
-
-
+
+
+
}
diff --git a/aai-core/src/test/java/org/onap/aai/query/builder/QueryBuilderTestAbstraction.java b/aai-core/src/test/java/org/onap/aai/query/builder/QueryBuilderTestAbstraction.java
index 95d0725e..ffb56057 100644
--- a/aai-core/src/test/java/org/onap/aai/query/builder/QueryBuilderTestAbstraction.java
+++ b/aai-core/src/test/java/org/onap/aai/query/builder/QueryBuilderTestAbstraction.java
@@ -47,6 +47,7 @@ import org.onap.aai.util.AAIConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.onap.aai.db.props.AAIProperties;
@@ -72,6 +73,9 @@ import static org.junit.Assert.*;
IntrospectionConfig.class
})
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
+@TestPropertySource(properties = {
+ "schema.translator.list = config"
+})
public abstract class QueryBuilderTestAbstraction {
protected Loader loader;
diff --git a/aai-core/src/test/java/org/onap/aai/query/builder/QueryTestsConfigTranslator.java b/aai-core/src/test/java/org/onap/aai/query/builder/QueryTestsConfigTranslator.java
index 90fb90ac..5cadb895 100644
--- a/aai-core/src/test/java/org/onap/aai/query/builder/QueryTestsConfigTranslator.java
+++ b/aai-core/src/test/java/org/onap/aai/query/builder/QueryTestsConfigTranslator.java
@@ -47,8 +47,7 @@ public class QueryTestsConfigTranslator extends AbstractConfigTranslator {
Map<SchemaVersion, List<String>> files = new TreeMap<>();
List<String> container = new ArrayList<>();
container.add(file);
- files.put(schemaVersions.getDefaultVersion(), container);
-
+ files.put(schemaVersions.getDefaultVersion(), container);
return files;
}
diff --git a/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializer_needsFakeRulesTest.java b/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializer_needsFakeRulesTest.java
index b9d65c5f..1226eda1 100644
--- a/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializer_needsFakeRulesTest.java
+++ b/aai-core/src/test/java/org/onap/aai/serialization/db/DbSerializer_needsFakeRulesTest.java
@@ -44,6 +44,7 @@ import org.onap.aai.serialization.queryformats.QueryFormatTestHelper;
import org.onap.aai.setup.SchemaLocationsBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.io.UnsupportedEncodingException;
@@ -67,6 +68,9 @@ import static org.mockito.Mockito.when;
SpringContextAware.class,
IntrospectionConfig.class
})
+@TestPropertySource(properties = {
+ "schema.translator.list = config"
+})
public class DbSerializer_needsFakeRulesTest {
//to use, set thrown.expect to whatever your test needs