diff options
Diffstat (limited to 'aai-core/src/test/java/org')
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 |