diff --git a/ModelCatalogueCorePluginTestApp/src/groovy/org/modelcatalogue/core/xml/CatalogueElementPrintHelper.groovy b/ModelCatalogueCorePluginTestApp/src/groovy/org/modelcatalogue/core/xml/CatalogueElementPrintHelper.groovy index 863b35dbb4..76c799530e 100644 --- a/ModelCatalogueCorePluginTestApp/src/groovy/org/modelcatalogue/core/xml/CatalogueElementPrintHelper.groovy +++ b/ModelCatalogueCorePluginTestApp/src/groovy/org/modelcatalogue/core/xml/CatalogueElementPrintHelper.groovy @@ -146,7 +146,7 @@ abstract class CatalogueElementPrintHelper { } protected void printBasedOn(theMkp, Relationship rel, PrintContext context) { - theMkp.basedOn(ref(rel.source, context)) { + theMkp.basedOn(ref(rel.destination, context)) { processRelationshipMetadata(theMkp, context, rel) } } diff --git a/ModelCatalogueCorePluginTestApp/src/groovy/org/modelcatalogue/core/xml/DataTypePrintHelper.groovy b/ModelCatalogueCorePluginTestApp/src/groovy/org/modelcatalogue/core/xml/DataTypePrintHelper.groovy index 666abb5828..c9c11e3f29 100644 --- a/ModelCatalogueCorePluginTestApp/src/groovy/org/modelcatalogue/core/xml/DataTypePrintHelper.groovy +++ b/ModelCatalogueCorePluginTestApp/src/groovy/org/modelcatalogue/core/xml/DataTypePrintHelper.groovy @@ -55,6 +55,6 @@ class DataTypePrintHelper extends CatalogueElementPrintHelper { @Override protected void printBasedOn(Object mkp, Relationship rel, PrintContext context) { - printElement(mkp, rel.source, context, rel) + printElement(mkp, rel.destination, context, rel) } } diff --git a/ModelCatalogueCorePluginTestApp/test/integration/org/modelcatalogue/core/xml/CatalogueXmlPrinterSpec.groovy b/ModelCatalogueCorePluginTestApp/test/integration/org/modelcatalogue/core/xml/CatalogueXmlPrinterSpec.groovy index 547e3d691b..36fd0f0046 100644 --- a/ModelCatalogueCorePluginTestApp/test/integration/org/modelcatalogue/core/xml/CatalogueXmlPrinterSpec.groovy +++ b/ModelCatalogueCorePluginTestApp/test/integration/org/modelcatalogue/core/xml/CatalogueXmlPrinterSpec.groovy @@ -244,12 +244,17 @@ class CatalogueXmlPrinterSpec extends AbstractIntegrationSpec { private DataType getInteger() { decimal - build { + DataType dataType = build { dataType(name: "Integer", id: "http://www.example.com/types/Integer") { basedOn 'Decimal' description "A number with no fractional part." } } + + assert dataType.isBasedOn + assert dataType.isBasedOn.any { it.name == 'Decimal'} + + dataType } private DataType getGender() { diff --git a/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/adhesion.catalogue.xml b/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/adhesion.catalogue.xml index ff03004751..e34105f745 100644 --- a/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/adhesion.catalogue.xml +++ b/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/adhesion.catalogue.xml @@ -2,7 +2,11 @@ A force is a push or pull upon an object resulting from the object's interaction with another object. - + + A number that uses a decimal point followed by digits that show a value smaller than one. + \d+ The newton (symbol: N) is the International System of Units (SI) derived unit of force. diff --git a/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/locomotive.catalogue.xml b/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/locomotive.catalogue.xml index 3be6dfd02c..97f2f24c20 100644 --- a/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/locomotive.catalogue.xml +++ b/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/locomotive.catalogue.xml @@ -3,7 +3,11 @@ A force is a push or pull upon an object resulting from the object's interaction with another object. - + + A number that uses a decimal point followed by digits that show a value smaller than one. + \d+ The newton (symbol: N) is the International System of Units (SI) derived unit of force. diff --git a/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/transportation.catalogue.xml b/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/transportation.catalogue.xml index e19f8fe7a7..8434c1fb1c 100644 --- a/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/transportation.catalogue.xml +++ b/ModelCatalogueCorePluginTestApp/test/integration/resources/xml/transportation.catalogue.xml @@ -5,7 +5,11 @@ A force is a push or pull upon an object resulting from the object's interaction with another object. - + + A number that uses a decimal point followed by digits that show a value smaller than one. + \d+ The newton (symbol: N) is the International System of Units (SI) derived unit of force. @@ -19,9 +23,6 @@ - - A number that uses a decimal point followed by digits that show a value smaller than one. -