diff --git a/pom.xml b/pom.xml index b334e17d5..2950601ad 100644 --- a/pom.xml +++ b/pom.xml @@ -144,6 +144,7 @@ rosetta-testing rosetta-maven-plugin rosetta-profiling + rosetta-integration-tests diff --git a/rosetta-integration-tests/pom.xml b/rosetta-integration-tests/pom.xml new file mode 100644 index 000000000..266d3db6e --- /dev/null +++ b/rosetta-integration-tests/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + + com.regnosys.rosetta + com.regnosys.rosetta.parent + 0.0.0.main-SNAPSHOT + + + Rosetta DSL Integration Test Project + rosetta-integration-tests + + 17 + + + + + + com.regnosys.rosetta + com.regnosys.rosetta + ${project.version} + + + + com.regnosys.rosetta + com.regnosys.rosetta.tests + ${project.version} + + + + + + org.eclipse.xtext + org.eclipse.xtext.testing + + + org.eclipse.xtext + org.eclipse.xtext.xbase.testing + + + org.junit.jupiter + junit-jupiter + + + org.mdkt.compiler + InMemoryJavaCompiler + + + + + org.mockito + mockito-core + test + + + + + + + org.eclipse.xtend + xtend-maven-plugin + + + org.apache.maven.plugins + maven-clean-plugin + + + + ${basedir}/xtend-gen + + **/* + + + + + + + + + + \ No newline at end of file diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/config/RosettaConfigurationTest.java b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/config/RosettaConfigurationTest.java similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/config/RosettaConfigurationTest.java rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/config/RosettaConfigurationTest.java diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/docrefs/DocReferenceTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/docrefs/DocReferenceTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/docrefs/DocReferenceTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/docrefs/DocReferenceTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/docs/DocumentationSamples.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/docs/DocumentationSamples.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/docs/DocumentationSamples.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/docs/DocumentationSamples.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/docs/EmptyModule.java b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/docs/EmptyModule.java similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/docs/EmptyModule.java rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/docs/EmptyModule.java diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/formatting2/ExpressionFormatterTestHelper.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/formatting2/ExpressionFormatterTestHelper.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/formatting2/ExpressionFormatterTestHelper.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/formatting2/ExpressionFormatterTestHelper.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/formatting2/ResourceFormatterServiceTest.java b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/formatting2/ResourceFormatterServiceTest.java similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/formatting2/ResourceFormatterServiceTest.java rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/formatting2/ResourceFormatterServiceTest.java diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/formatting2/RosettaExpressionFormattingTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/formatting2/RosettaExpressionFormattingTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/formatting2/RosettaExpressionFormattingTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/formatting2/RosettaExpressionFormattingTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/formatting2/RosettaFormattingTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/formatting2/RosettaFormattingTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/formatting2/RosettaFormattingTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/formatting2/RosettaFormattingTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/ChoiceRuleGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/ChoiceRuleGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/ChoiceRuleGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/ChoiceRuleGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/ConditionGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/ConditionGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/ConditionGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/ConditionGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/ConditionTestHelper.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/ConditionTestHelper.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/ConditionTestHelper.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/ConditionTestHelper.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/DataRuleGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/DataRuleGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/DataRuleGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/DataRuleGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/OneOfRuleGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/OneOfRuleGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/OneOfRuleGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/OneOfRuleGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/RosettaConditionTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/RosettaConditionTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/condition/RosettaConditionTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/condition/RosettaConditionTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/ExpressionGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/ExpressionGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/ExpressionGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/ExpressionGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/ListOperationTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/ListOperationTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/ListOperationTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/ListOperationTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaBinaryOperationTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaBinaryOperationTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaBinaryOperationTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaBinaryOperationTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaCountOperationTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaCountOperationTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaCountOperationTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaCountOperationTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaExistsExpressionTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaExistsExpressionTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaExistsExpressionTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/RosettaExistsExpressionTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/TypeCoercionTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/TypeCoercionTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/expression/TypeCoercionTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/expression/TypeCoercionTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/function/CalculationFunctionGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/function/CalculationFunctionGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/function/CalculationFunctionGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/function/CalculationFunctionGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/function/FunctionGeneratorHelper.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/function/FunctionGeneratorHelper.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/function/FunctionGeneratorHelper.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/function/FunctionGeneratorHelper.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/function/FunctionGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/function/FunctionGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/function/FunctionGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/function/FunctionGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ConfigurableTypeTabulatorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ConfigurableTypeTabulatorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ConfigurableTypeTabulatorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ConfigurableTypeTabulatorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/EnumGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/EnumGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/EnumGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/EnumGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ExternalHashcodeGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ExternalHashcodeGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ExternalHashcodeGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ExternalHashcodeGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/GlobalKeyGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/GlobalKeyGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/GlobalKeyGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/GlobalKeyGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelMetaGeneratorFilteredNamespaceTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelMetaGeneratorFilteredNamespaceTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelMetaGeneratorFilteredNamespaceTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelMetaGeneratorFilteredNamespaceTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelMetaGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelMetaGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelMetaGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelMetaGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectBoilerPlateTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectBoilerPlateTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectBoilerPlateTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectBoilerPlateTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectBuilderGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectBuilderGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectBuilderGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectBuilderGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/ModelObjectGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/PojoInheritanceRegressionTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/PojoInheritanceRegressionTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/PojoInheritanceRegressionTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/PojoInheritanceRegressionTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/PojoRegressionTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/PojoRegressionTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/PojoRegressionTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/PojoRegressionTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaAttributePathProcessor.java b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaAttributePathProcessor.java similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaAttributePathProcessor.java rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaAttributePathProcessor.java diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaExtensionsTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaExtensionsTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaExtensionsTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaExtensionsTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaModelTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaModelTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaModelTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaModelTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaObjectInheritanceGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaObjectInheritanceGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaObjectInheritanceGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaObjectInheritanceGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaProcessorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaProcessorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaProcessorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/object/RosettaProcessorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/qualify/QualifyTestHelper.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/qualify/QualifyTestHelper.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/qualify/QualifyTestHelper.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/qualify/QualifyTestHelper.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/qualify/RosettaQualifyEventTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/qualify/RosettaQualifyEventTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/qualify/RosettaQualifyEventTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/qualify/RosettaQualifyEventTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/qualify/RosettaQualifyProductTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/qualify/RosettaQualifyProductTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/qualify/RosettaQualifyProductTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/qualify/RosettaQualifyProductTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/ConfigurableTabulatorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/ConfigurableTabulatorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/ConfigurableTabulatorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/ConfigurableTabulatorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/ReportingTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/ReportingTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/ReportingTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/ReportingTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorCircularDependencyTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorCircularDependencyTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorCircularDependencyTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorCircularDependencyTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorTestUtil.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorTestUtil.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorTestUtil.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/reports/TabulatorTestUtil.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/rule/RosettaRuleGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/rule/RosettaRuleGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/rule/RosettaRuleGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/rule/RosettaRuleGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/util/ModelGeneratorUtilTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/util/ModelGeneratorUtilTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/util/ModelGeneratorUtilTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/util/ModelGeneratorUtilTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/validator/ValidatorGeneratorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/validator/ValidatorGeneratorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/generator/java/validator/ValidatorGeneratorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/generator/java/validator/ValidatorGeneratorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/interpreter/RosettaInterpreterTest.java b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/interpreter/RosettaInterpreterTest.java similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/interpreter/RosettaInterpreterTest.java rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/interpreter/RosettaInterpreterTest.java diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/issues/Issue844.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/issues/Issue844.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/issues/Issue844.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/issues/Issue844.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/issues/Issue868.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/issues/Issue868.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/issues/Issue868.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/issues/Issue868.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/resource/RosettaFragmentProviderTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/resource/RosettaFragmentProviderTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/resource/RosettaFragmentProviderTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/resource/RosettaFragmentProviderTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/tests/RosettaExpressionsTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/tests/RosettaExpressionsTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/tests/RosettaExpressionsTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/tests/RosettaExpressionsTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/tests/RosettaParsingTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/tests/RosettaParsingTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/tests/RosettaParsingTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/tests/RosettaParsingTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/tests/util/ExpressionParserTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/tests/util/ExpressionParserTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/tests/util/ExpressionParserTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/tests/util/ExpressionParserTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/types/RosettaTypeProviderTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/types/RosettaTypeProviderTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/types/RosettaTypeProviderTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/types/RosettaTypeProviderTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/types/SubtypeRelationTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/types/SubtypeRelationTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/types/SubtypeRelationTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/types/SubtypeRelationTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/utils/RosettaSimpleSystemSolverTest.java b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/utils/RosettaSimpleSystemSolverTest.java similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/utils/RosettaSimpleSystemSolverTest.java rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/utils/RosettaSimpleSystemSolverTest.java diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/validation/AttributeValidatorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/AttributeValidatorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/validation/AttributeValidatorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/AttributeValidatorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/validation/ChoiceValidatorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/ChoiceValidatorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/validation/ChoiceValidatorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/ChoiceValidatorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/validation/EnumValidatorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/EnumValidatorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/validation/EnumValidatorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/EnumValidatorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/validation/RosettaValidatorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/RosettaValidatorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/validation/RosettaValidatorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/RosettaValidatorTest.xtend diff --git a/rosetta-testing/src/test/java/com/regnosys/rosetta/validation/TypeValidatorTest.xtend b/rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/TypeValidatorTest.xtend similarity index 100% rename from rosetta-testing/src/test/java/com/regnosys/rosetta/validation/TypeValidatorTest.xtend rename to rosetta-integration-tests/src/test/java/com/regnosys/rosetta/validation/TypeValidatorTest.xtend diff --git a/rosetta-testing/src/test/resources/formatting-test/expected/nestedConstructor.rosetta b/rosetta-integration-tests/src/test/resources/formatting-test/expected/nestedConstructor.rosetta similarity index 100% rename from rosetta-testing/src/test/resources/formatting-test/expected/nestedConstructor.rosetta rename to rosetta-integration-tests/src/test/resources/formatting-test/expected/nestedConstructor.rosetta diff --git a/rosetta-testing/src/test/resources/formatting-test/expected/typeAlias.rosetta b/rosetta-integration-tests/src/test/resources/formatting-test/expected/typeAlias.rosetta similarity index 100% rename from rosetta-testing/src/test/resources/formatting-test/expected/typeAlias.rosetta rename to rosetta-integration-tests/src/test/resources/formatting-test/expected/typeAlias.rosetta diff --git a/rosetta-testing/src/test/resources/formatting-test/expected/typeAliasWithDocumentation.rosetta b/rosetta-integration-tests/src/test/resources/formatting-test/expected/typeAliasWithDocumentation.rosetta similarity index 100% rename from rosetta-testing/src/test/resources/formatting-test/expected/typeAliasWithDocumentation.rosetta rename to rosetta-integration-tests/src/test/resources/formatting-test/expected/typeAliasWithDocumentation.rosetta diff --git a/rosetta-testing/src/test/resources/formatting-test/input/nestedConstructor.rosetta b/rosetta-integration-tests/src/test/resources/formatting-test/input/nestedConstructor.rosetta similarity index 100% rename from rosetta-testing/src/test/resources/formatting-test/input/nestedConstructor.rosetta rename to rosetta-integration-tests/src/test/resources/formatting-test/input/nestedConstructor.rosetta diff --git a/rosetta-testing/src/test/resources/formatting-test/input/onlyExists.rosetta b/rosetta-integration-tests/src/test/resources/formatting-test/input/onlyExists.rosetta similarity index 100% rename from rosetta-testing/src/test/resources/formatting-test/input/onlyExists.rosetta rename to rosetta-integration-tests/src/test/resources/formatting-test/input/onlyExists.rosetta diff --git a/rosetta-testing/src/test/resources/formatting-test/input/typeAlias.rosetta b/rosetta-integration-tests/src/test/resources/formatting-test/input/typeAlias.rosetta similarity index 100% rename from rosetta-testing/src/test/resources/formatting-test/input/typeAlias.rosetta rename to rosetta-integration-tests/src/test/resources/formatting-test/input/typeAlias.rosetta diff --git a/rosetta-testing/src/test/resources/formatting-test/input/typeAliasWithDocumentation.rosetta b/rosetta-integration-tests/src/test/resources/formatting-test/input/typeAliasWithDocumentation.rosetta similarity index 100% rename from rosetta-testing/src/test/resources/formatting-test/input/typeAliasWithDocumentation.rosetta rename to rosetta-integration-tests/src/test/resources/formatting-test/input/typeAliasWithDocumentation.rosetta diff --git a/rosetta-testing/src/test/resources/logback-test.xml b/rosetta-integration-tests/src/test/resources/logback-test.xml similarity index 100% rename from rosetta-testing/src/test/resources/logback-test.xml rename to rosetta-integration-tests/src/test/resources/logback-test.xml diff --git a/rosetta-testing/src/test/resources/rosetta-config-test-without-tabulators.yml b/rosetta-integration-tests/src/test/resources/rosetta-config-test-without-tabulators.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-config-test-without-tabulators.yml rename to rosetta-integration-tests/src/test/resources/rosetta-config-test-without-tabulators.yml diff --git a/rosetta-testing/src/test/resources/rosetta-config-test.yml b/rosetta-integration-tests/src/test/resources/rosetta-config-test.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-config-test.yml rename to rosetta-integration-tests/src/test/resources/rosetta-config-test.yml diff --git a/rosetta-testing/src/test/resources/rosetta-config.yml b/rosetta-integration-tests/src/test/resources/rosetta-config.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-config.yml rename to rosetta-integration-tests/src/test/resources/rosetta-config.yml diff --git a/rosetta-testing/src/test/resources/rosetta-custom-config.yml b/rosetta-integration-tests/src/test/resources/rosetta-custom-config.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-custom-config.yml rename to rosetta-integration-tests/src/test/resources/rosetta-custom-config.yml diff --git a/rosetta-testing/src/test/resources/rosetta-filtered-config-model1.yml b/rosetta-integration-tests/src/test/resources/rosetta-filtered-config-model1.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-filtered-config-model1.yml rename to rosetta-integration-tests/src/test/resources/rosetta-filtered-config-model1.yml diff --git a/rosetta-testing/src/test/resources/rosetta-filtered-config-model2.yml b/rosetta-integration-tests/src/test/resources/rosetta-filtered-config-model2.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-filtered-config-model2.yml rename to rosetta-integration-tests/src/test/resources/rosetta-filtered-config-model2.yml diff --git a/rosetta-testing/src/test/resources/rosetta-tabulator-type-config-default.yml b/rosetta-integration-tests/src/test/resources/rosetta-tabulator-type-config-default.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-tabulator-type-config-default.yml rename to rosetta-integration-tests/src/test/resources/rosetta-tabulator-type-config-default.yml diff --git a/rosetta-testing/src/test/resources/rosetta-tabulator-type-config-model1.yml b/rosetta-integration-tests/src/test/resources/rosetta-tabulator-type-config-model1.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-tabulator-type-config-model1.yml rename to rosetta-integration-tests/src/test/resources/rosetta-tabulator-type-config-model1.yml diff --git a/rosetta-testing/src/test/resources/rosetta-tabulator-type-config-model2.yml b/rosetta-integration-tests/src/test/resources/rosetta-tabulator-type-config-model2.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-tabulator-type-config-model2.yml rename to rosetta-integration-tests/src/test/resources/rosetta-tabulator-type-config-model2.yml diff --git a/rosetta-testing/src/test/resources/rosetta-tabulator-type-config-model3.yml b/rosetta-integration-tests/src/test/resources/rosetta-tabulator-type-config-model3.yml similarity index 100% rename from rosetta-testing/src/test/resources/rosetta-tabulator-type-config-model3.yml rename to rosetta-integration-tests/src/test/resources/rosetta-tabulator-type-config-model3.yml diff --git a/rosetta-lang/src/main/java/com/regnosys/rosetta/GenerateRosetta.mwe2 b/rosetta-lang/src/main/java/com/regnosys/rosetta/GenerateRosetta.mwe2 index 702b07ab4..54d3d4075 100644 --- a/rosetta-lang/src/main/java/com/regnosys/rosetta/GenerateRosetta.mwe2 +++ b/rosetta-lang/src/main/java/com/regnosys/rosetta/GenerateRosetta.mwe2 @@ -30,11 +30,7 @@ Workflow { srcGen = "${parentDir}/rosetta-lang/src-gen/main/java" } runtimeTest = { - enabled = true - name = "rosetta-testing" - root = "${parentDir}/rosetta-testing" - src = "${parentDir}/rosetta-testing/src/test/java" - srcGen = "${parentDir}/rosetta-testing/src-gen/main/java" + enabled = false } genericIde = { enabled = true diff --git a/rosetta-testing/pom.xml b/rosetta-testing/pom.xml index e04368d97..c24cfc042 100644 --- a/rosetta-testing/pom.xml +++ b/rosetta-testing/pom.xml @@ -25,7 +25,7 @@ 0.0.0.main-SNAPSHOT - Rosetta DSL Test Project + Rosetta DSL Testing Utilities com.regnosys.rosetta.tests diff --git a/rosetta-testing/src/main/java/com/regnosys/rosetta/tests/RosettaInjectorProvider.java b/rosetta-testing/src/main/java/com/regnosys/rosetta/tests/RosettaInjectorProvider.java new file mode 100644 index 000000000..3f779781d --- /dev/null +++ b/rosetta-testing/src/main/java/com/regnosys/rosetta/tests/RosettaInjectorProvider.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) REGnosys 2018 (www.regnosys.com) + * generated by Xtext 2.38.0.M1 + */ +package com.regnosys.rosetta.tests; + +import com.google.inject.Guice; +import com.google.inject.Injector; +import com.regnosys.rosetta.RosettaRuntimeModule; +import com.regnosys.rosetta.RosettaStandaloneSetup; +import org.eclipse.xtext.testing.GlobalRegistries; +import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento; +import org.eclipse.xtext.testing.IInjectorProvider; +import org.eclipse.xtext.testing.IRegistryConfigurator; + +public class RosettaInjectorProvider implements IInjectorProvider, IRegistryConfigurator { + + protected GlobalStateMemento stateBeforeInjectorCreation; + protected GlobalStateMemento stateAfterInjectorCreation; + protected Injector injector; + + static { + GlobalRegistries.initializeDefaults(); + } + + @Override + public Injector getInjector() { + if (injector == null) { + this.injector = internalCreateInjector(); + stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + } + return injector; + } + + protected Injector internalCreateInjector() { + return new RosettaStandaloneSetup() { + @Override + public Injector createInjector() { + return Guice.createInjector(createRuntimeModule()); + } + }.createInjectorAndDoEMFRegistration(); + } + + protected RosettaRuntimeModule createRuntimeModule() { + // make it work also with Maven/Tycho and OSGI + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672 + return new RosettaRuntimeModule() { + @Override + public ClassLoader bindClassLoaderToInstance() { + return RosettaInjectorProvider.class + .getClassLoader(); + } + }; + } + + @Override + public void restoreRegistry() { + stateBeforeInjectorCreation.restoreGlobalState(); + stateBeforeInjectorCreation = null; + } + + @Override + public void setupRegistry() { + stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + if (injector == null) { + getInjector(); + } + stateAfterInjectorCreation.restoreGlobalState(); + } +}