diff options
Diffstat (limited to 'aai-schema-gen/src/test')
11 files changed, 109 insertions, 140 deletions
diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/GenerateXsdTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/GenerateXsdTest.java index 0b99454..9b28e3b 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/GenerateXsdTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/GenerateXsdTest.java @@ -33,11 +33,15 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.onap.aai.edges.EdgeIngestor; import org.onap.aai.nodes.NodeIngestor; -import org.onap.aai.schemagen.genxsd.*; +import org.onap.aai.schemagen.genxsd.HTMLfromOXM; +import org.onap.aai.schemagen.genxsd.HTMLfromOXMTest; +import org.onap.aai.schemagen.genxsd.XSDElementTest; +import org.onap.aai.schemagen.genxsd.YAMLfromOXM; +import org.onap.aai.schemagen.genxsd.YAMLfromOXMTest; import org.onap.aai.schemagen.testutils.TestUtilConfigTranslatorforBusiness; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -50,7 +54,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @ContextConfiguration( classes = {SchemaLocationsBean.class, TestUtilConfigTranslatorforBusiness.class, EdgeIngestor.class, NodeIngestor.class, SwaggerGenerationConfiguration.class, - SchemaVersions.class}) + SchemaConfigVersions.class}) @TestPropertySource(properties = {"schema.uri.base.path = /aai", "schema.xsd.maxoccurs = 5000"}) public class GenerateXsdTest { private static final Logger logger = LoggerFactory.getLogger("GenerateXsd.class"); @@ -67,7 +71,7 @@ public class GenerateXsdTest { HTMLfromOXM htmlFromOxm; @Autowired - SchemaVersions schemaVersions; + SchemaConfigVersions schemaConfigVersions; @BeforeClass public static void setUpBeforeClass() throws Exception { @@ -96,7 +100,7 @@ public class GenerateXsdTest { @Test public void test_generateSwaggerFromOxmFile() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String fileContent = null; try { @@ -112,7 +116,7 @@ public class GenerateXsdTest { @Test public void test_generateXSDFromOxmFile() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String fileContent = null; try { htmlFromOxm.setXmlVersion(testXML, v); @@ -126,7 +130,7 @@ public class GenerateXsdTest { @Test public void testGetAPIVersion() { - GenerateXsd.apiVersion = schemaVersions.getAppRootVersion().toString(); + GenerateXsd.apiVersion = schemaConfigVersions.getAppRootVersion().toString(); assertThat(GenerateXsd.getAPIVersion(), is("v11")); } diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/EdgeDescriptionTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/EdgeDescriptionTest.java index 1469272..046f961 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/EdgeDescriptionTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/EdgeDescriptionTest.java @@ -29,7 +29,11 @@ import com.google.common.collect.Multimap; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; -import java.util.*; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.SortedSet; +import java.util.TreeSet; import org.junit.AfterClass; import org.junit.Before; @@ -41,9 +45,9 @@ import org.onap.aai.edges.EdgeRule; import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException; import org.onap.aai.schemagen.testutils.TestUtilConfigTranslatorforEdges; import org.onap.aai.setup.ConfigTranslator; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; @@ -51,7 +55,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration( - classes = {SchemaVersions.class, SchemaLocationsBean.class, + classes = {SchemaConfigVersions.class, SchemaLocationsBean.class, TestUtilConfigTranslatorforEdges.class, EdgeIngestor.class}) @TestPropertySource( properties = { diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/HTMLfromOXMTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/HTMLfromOXMTest.java index d4a6517..46f90ce 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/HTMLfromOXMTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/HTMLfromOXMTest.java @@ -40,9 +40,9 @@ import org.onap.aai.edges.EdgeIngestor; import org.onap.aai.nodes.NodeIngestor; import org.onap.aai.schemagen.SwaggerGenerationConfiguration; import org.onap.aai.schemagen.testutils.TestUtilConfigTranslatorforBusiness; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -54,7 +54,7 @@ import org.w3c.dom.Element; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration( - classes = {SchemaVersions.class, SchemaLocationsBean.class, + classes = {SchemaConfigVersions.class, SchemaLocationsBean.class, TestUtilConfigTranslatorforBusiness.class, EdgeIngestor.class, NodeIngestor.class, SwaggerGenerationConfiguration.class @@ -71,7 +71,7 @@ public class HTMLfromOXMTest { HTMLfromOXM htmlFromOxm; @Autowired - SchemaVersions schemaVersions; + SchemaConfigVersions schemaConfigVersions; @BeforeClass public static void setUpContext() throws Exception { @@ -102,11 +102,11 @@ public class HTMLfromOXMTest { @Test public void testGetDocumentHeader() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String header = null; try { htmlFromOxm.setXmlVersion(testXML, v); - htmlFromOxm.setSchemaVersions(schemaVersions); + htmlFromOxm.setSchemaConfigVersions(schemaConfigVersions); header = htmlFromOxm.getDocumentHeader(); } catch (Exception e) { e.printStackTrace(); @@ -118,7 +118,7 @@ public class HTMLfromOXMTest { @Test public void testProcess() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String fileContent = null; try { htmlFromOxm.setXmlVersion(testXML, v); @@ -133,7 +133,7 @@ public class HTMLfromOXMTest { @Test public void testProcessWithCombiningJavaTypes() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String fileContent = null; try { setUp(1); @@ -158,7 +158,7 @@ public class HTMLfromOXMTest { bw = Files.newBufferedWriter(path, charset); bw.write(testXML); bw.close(); - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String fileContent = null; try { htmlFromOxm.setXmlVersion(testXML, v); @@ -174,7 +174,7 @@ public class HTMLfromOXMTest { @Test public void testHTMLfromOXMStringVersion() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String fileContent = null; try { htmlFromOxm.setXmlVersion(testXML, v); @@ -190,7 +190,7 @@ public class HTMLfromOXMTest { @Test public void testProcessJavaTypeElement() { String target = "Element=java-type/Customer"; - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); Element customer = null; try { htmlFromOxm.setXmlVersion(testXML, v); diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java index 468de16..ac225f0 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/NodesYAMLfromOXMTest.java @@ -40,9 +40,9 @@ import org.onap.aai.edges.EdgeIngestor; import org.onap.aai.nodes.NodeIngestor; import org.onap.aai.schemagen.SwaggerGenerationConfiguration; import org.onap.aai.schemagen.testutils.TestUtilConfigTranslatorforEdges; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -54,7 +54,7 @@ import org.w3c.dom.Element; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration( - classes = {SchemaVersions.class, SchemaLocationsBean.class, + classes = {SchemaConfigVersions.class, SchemaLocationsBean.class, TestUtilConfigTranslatorforEdges.class, EdgeIngestor.class, NodeIngestor.class, SwaggerGenerationConfiguration.class @@ -72,7 +72,7 @@ public class NodesYAMLfromOXMTest { @Autowired NodesYAMLfromOXM nodesYamlFromOxm; @Autowired - SchemaVersions schemaVersions; + SchemaConfigVersions schemaConfigVersions; @BeforeClass public static void setUpBeforeClass() throws Exception { @@ -103,7 +103,7 @@ public class NodesYAMLfromOXMTest { @Test public void testGetDocumentHeader() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String header = null; try { @@ -119,7 +119,7 @@ public class NodesYAMLfromOXMTest { @Test public void testProcess() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String fileContent = null; try { @@ -142,7 +142,7 @@ public class NodesYAMLfromOXMTest { bw = Files.newBufferedWriter(path, charset); bw.write(testXML); bw.close(); - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String fileContent = null; try { @@ -157,7 +157,7 @@ public class NodesYAMLfromOXMTest { @Test public void testNodesYAMLfromOXMStringVersionFile() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String fileContent = null; try { @@ -171,7 +171,7 @@ public class NodesYAMLfromOXMTest { @Test public void testAppendDefinitions() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String definitions = null; try { @@ -187,7 +187,7 @@ public class NodesYAMLfromOXMTest { @Test public void testGetXMLRootElementName() { String target = "RootElement=customer"; - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); Element customer = null; String root = null; @@ -205,7 +205,7 @@ public class NodesYAMLfromOXMTest { @Test public void testGetXmlRootElementName() { String target = "RootElement=customer"; - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String root = null; try { @@ -221,7 +221,7 @@ public class NodesYAMLfromOXMTest { @Test public void testGetJavaTypeElementSwagger() { String target = "Element=java-type/Customer"; - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); Element customer = null; try { diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PutRelationPathSetTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PutRelationPathSetTest.java index 09a8dd4..b955f96 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PutRelationPathSetTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/PutRelationPathSetTest.java @@ -35,15 +35,15 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.onap.aai.edges.EdgeIngestor; import org.onap.aai.schemagen.GenerateXsd; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; 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; @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = {SchemaVersions.class, EdgeIngestor.class}) +@ContextConfiguration(classes = {SchemaConfigVersions.class, EdgeIngestor.class}) @TestPropertySource(properties = {"schema.uri.base.path = /aai"}) @Ignore("This test needs to get major rework done as it is written very poorly") public class PutRelationPathSetTest { @@ -61,14 +61,14 @@ public class PutRelationPathSetTest { "/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/availability-zones/availability-zone/{availability-zone-name}/relationship-list/relationship"; PutRelationPathSet prp = null; @Autowired - SchemaVersions schemaVersions; + SchemaConfigVersions schemaConfigVersions; @Autowired EdgeIngestor edgeIngestor; @Before public void setUpBeforeClass() throws Exception { - v = schemaVersions.getDefaultVersion(); + v = schemaConfigVersions.getDefaultVersion(); relationsFile = new File(GenerateXsd.getYamlDir() + "/relations/" + v.toString() + "/createOrUpdateCloudInfrastructureCloudRegionsCloudRegionAvailabilityZonesAvailabilityZone.json"); diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java index 1d06c38..ed13981 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/genxsd/YAMLfromOXMTest.java @@ -48,9 +48,9 @@ import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException; import org.onap.aai.nodes.NodeIngestor; import org.onap.aai.schemagen.SwaggerGenerationConfiguration; import org.onap.aai.schemagen.testutils.TestUtilConfigTranslatorforBusiness; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -63,9 +63,9 @@ import org.w3c.dom.Element; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration( - classes = {SchemaVersions.class, SchemaLocationsBean.class, - TestUtilConfigTranslatorforBusiness.class, SchemaVersions.class, EdgeIngestor.class, - NodeIngestor.class, SwaggerGenerationConfiguration.class + classes = {SchemaConfigVersions.class, SchemaLocationsBean.class, + TestUtilConfigTranslatorforBusiness.class, EdgeIngestor.class, NodeIngestor.class, + SwaggerGenerationConfiguration.class }) @TestPropertySource(properties = {"schema.uri.base.path = /aai", "schema.xsd.maxoccurs = 5000"}) @@ -88,7 +88,7 @@ public class YAMLfromOXMTest { YAMLfromOXM yamlFromOxm; @Autowired - SchemaVersions schemaVersions; + SchemaConfigVersions schemaConfigVersions; @BeforeClass public static void setUpBeforeClass() throws Exception { @@ -131,7 +131,7 @@ public class YAMLfromOXMTest { @Test public void AtestIngestors() throws EdgeRuleNotFoundException { Multimap<String, EdgeRule> results = - edgeIngestor.getAllRules(schemaVersions.getDefaultVersion()); + edgeIngestor.getAllRules(schemaConfigVersions.getDefaultVersion()); SortedSet<String> ss = new TreeSet<String>(results.keySet()); for (String key : ss) { results.get(key).stream().filter((i) -> ((!i.isPrivateEdge()))).forEach((i) -> { @@ -139,13 +139,13 @@ public class YAMLfromOXMTest { System.out.println(ed.getRuleKey()); }); } - Document doc = nodeIngestor.getSchema(schemaVersions.getDefaultVersion()); + Document doc = nodeIngestor.getSchema(schemaConfigVersions.getDefaultVersion()); assertNotNull(doc); } @Test public void testGetDocumentHeader() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String header = null; try { @@ -160,7 +160,7 @@ public class YAMLfromOXMTest { @Test public void testProcess() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String fileContent = null; try { @@ -183,7 +183,7 @@ public class YAMLfromOXMTest { bw = Files.newBufferedWriter(path, charset); bw.write(testXML); bw.close(); - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String fileContent = null; try { @@ -199,7 +199,7 @@ public class YAMLfromOXMTest { @Test public void testYAMLfromOXMStringVersionFile() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String fileContent = null; try { @@ -220,7 +220,7 @@ public class YAMLfromOXMTest { // TODO Auto-generated catch block e1.printStackTrace(); } - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String fileContent = null; try { @@ -235,7 +235,7 @@ public class YAMLfromOXMTest { @Test public void testAppendDefinitions() { - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String definitions = null; try { @@ -252,7 +252,7 @@ public class YAMLfromOXMTest { @Test public void testGetXMLRootElementName() { String target = "RootElement=customer"; - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); Element customer = null; String root = null; @@ -270,7 +270,7 @@ public class YAMLfromOXMTest { @Test public void testGetXmlRootElementName() { String target = "RootElement=customer"; - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); String root = null; try { @@ -286,7 +286,7 @@ public class YAMLfromOXMTest { @Test public void testGetJavaTypeElementSwagger() { String target = "Element=java-type/Customer"; - SchemaVersion v = schemaVersions.getAppRootVersion(); + SchemaVersion v = schemaConfigVersions.getAppRootVersion(); String apiVersion = v.toString(); Element customer = null; try { diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforBusiness.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforBusiness.java index fdc2002..cfa51c4 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforBusiness.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforBusiness.java @@ -25,16 +25,16 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; -import org.onap.aai.setup.ConfigTranslator; +import org.onap.aai.setup.AAIConfigTranslator; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; -public class TestUtilConfigTranslatorforBusiness extends ConfigTranslator { +public class TestUtilConfigTranslatorforBusiness extends AAIConfigTranslator { public TestUtilConfigTranslatorforBusiness(SchemaLocationsBean bean, - SchemaVersions schemaVersions) { - super(bean, schemaVersions); + SchemaConfigVersions schemaConfigVersions) { + super(bean, schemaConfigVersions); } @Override diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforDataLink.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforDataLink.java index 7fdcc34..e1522fa 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforDataLink.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforDataLink.java @@ -26,15 +26,15 @@ import java.util.Map; import java.util.TreeMap; import org.onap.aai.setup.ConfigTranslator; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; public class TestUtilConfigTranslatorforDataLink extends ConfigTranslator { public TestUtilConfigTranslatorforDataLink(SchemaLocationsBean bean, - SchemaVersions schemaVersions) { - super(bean, schemaVersions); + SchemaConfigVersions schemaConfigVersions) { + super(bean, schemaConfigVersions); } @Override diff --git a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforEdges.java b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforEdges.java index ca45b9d..ae0ede9 100644 --- a/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforEdges.java +++ b/aai-schema-gen/src/test/java/org/onap/aai/schemagen/testutils/TestUtilConfigTranslatorforEdges.java @@ -25,16 +25,16 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; -import org.onap.aai.setup.ConfigTranslator; +import org.onap.aai.setup.AAIConfigTranslator; +import org.onap.aai.setup.SchemaConfigVersions; import org.onap.aai.setup.SchemaLocationsBean; import org.onap.aai.setup.SchemaVersion; -import org.onap.aai.setup.SchemaVersions; -public class TestUtilConfigTranslatorforEdges extends ConfigTranslator { +public class TestUtilConfigTranslatorforEdges extends AAIConfigTranslator { public TestUtilConfigTranslatorforEdges(SchemaLocationsBean bean, - SchemaVersions schemaVersions) { - super(bean, schemaVersions); + SchemaConfigVersions schemaConfigVersions) { + super(bean, schemaConfigVersions); } @Override diff --git a/aai-schema-gen/src/test/resources/dbedgerules/DbEdgeBusinessRules_test.json b/aai-schema-gen/src/test/resources/dbedgerules/DbEdgeBusinessRules_test.json index c25f1fb..c69b741 100644 --- a/aai-schema-gen/src/test/resources/dbedgerules/DbEdgeBusinessRules_test.json +++ b/aai-schema-gen/src/test/resources/dbedgerules/DbEdgeBusinessRules_test.json @@ -1,39 +1,39 @@ { - "rules": [ - { - "from": "service-subscription", - "to": "customer", - "label": "org.onap.relationships.inventory.BelongsTo", - "direction": "OUT", - "multiplicity": "MANY2ONE", - "contains-other-v": "!${direction}", - "delete-other-v": "!${direction}", - "prevent-delete": "NONE", - "default": "true", - "description":"" - }, - { - "from": "service-instance", - "to": "service-subscription", - "label": "org.onap.relationships.inventory.BelongsTo", - "direction": "OUT", - "multiplicity": "MANY2ONE", - "contains-other-v": "!${direction}", - "delete-other-v": "!${direction}", - "prevent-delete": "NONE", - "default": "true", - "description":"" - }, - { - "from": "service-subscription", - "to": "tenant", - "label": "org.onap.relationships.inventory.Uses", - "direction": "OUT", - "multiplicity": "MANY2MANY", - "contains-other-v": "NONE", - "delete-other-v": "NONE", - "prevent-delete": "NONE", - "default": "true", - "description":"" - } ] + "rules": [ + { + "from": "service-subscription", + "to": "customer", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-instance", + "to": "service-subscription", + "label": "org.onap.relationships.inventory.BelongsTo", + "direction": "OUT", + "multiplicity": "MANY2ONE", + "contains-other-v": "!${direction}", + "delete-other-v": "!${direction}", + "prevent-delete": "NONE", + "default": "true", + "description":"" + }, + { + "from": "service-subscription", + "to": "tenant", + "label": "org.onap.relationships.inventory.Uses", + "direction": "OUT", + "multiplicity": "MANY2MANY", + "contains-other-v": "NONE", + "delete-other-v": "NONE", + "prevent-delete": "NONE", + "default": "true", + "description":"" + } ] } diff --git a/aai-schema-gen/src/test/resources/dbedgerules/EdgeDescriptionRules_test.json b/aai-schema-gen/src/test/resources/dbedgerules/EdgeDescriptionRules_test.json deleted file mode 100644 index c25f1fb..0000000 --- a/aai-schema-gen/src/test/resources/dbedgerules/EdgeDescriptionRules_test.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "rules": [ - { - "from": "service-subscription", - "to": "customer", - "label": "org.onap.relationships.inventory.BelongsTo", - "direction": "OUT", - "multiplicity": "MANY2ONE", - "contains-other-v": "!${direction}", - "delete-other-v": "!${direction}", - "prevent-delete": "NONE", - "default": "true", - "description":"" - }, - { - "from": "service-instance", - "to": "service-subscription", - "label": "org.onap.relationships.inventory.BelongsTo", - "direction": "OUT", - "multiplicity": "MANY2ONE", - "contains-other-v": "!${direction}", - "delete-other-v": "!${direction}", - "prevent-delete": "NONE", - "default": "true", - "description":"" - }, - { - "from": "service-subscription", - "to": "tenant", - "label": "org.onap.relationships.inventory.Uses", - "direction": "OUT", - "multiplicity": "MANY2MANY", - "contains-other-v": "NONE", - "delete-other-v": "NONE", - "prevent-delete": "NONE", - "default": "true", - "description":"" - } ] -} |