diff --git a/.gitignore b/.gitignore index 8f7c323e7..187b981b9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ target/ *.ipr *.iws *.idea +out/ # Mac .DS_Store diff --git a/mule-migration-tool-e2e-tests/src/test/java/com/mulesoft/tools/migration/e2e/TransformMigrationTestCase.java b/mule-migration-tool-e2e-tests/src/test/java/com/mulesoft/tools/migration/e2e/TransformMigrationTestCase.java new file mode 100644 index 000000000..a8173cb9d --- /dev/null +++ b/mule-migration-tool-e2e-tests/src/test/java/com/mulesoft/tools/migration/e2e/TransformMigrationTestCase.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, Mulesoft, LLC. All rights reserved. + * Use of this source code is governed by a BSD 3-Clause License + * license that can be found in the LICENSE.txt file. + */ +package com.mulesoft.tools.migration.e2e; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + + +@RunWith(Parameterized.class) +public class TransformMigrationTestCase extends AbstractEndToEndTestCase { + + @Parameters(name = "{0}") + public static Object[] params() { + return new Object[] { + "ee_transform/ee_transform_01" + }; + } + + private final String appToMigrate; + + public TransformMigrationTestCase(String appToMigrate) { + this.appToMigrate = appToMigrate; + } + + @Test + public void test() throws Exception { + simpleCase(appToMigrate); + } +} diff --git a/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/input/src/main/app/mule-config.xml b/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/input/src/main/app/mule-config.xml new file mode 100644 index 000000000..190e3f5b3 --- /dev/null +++ b/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/input/src/main/app/mule-config.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + diff --git a/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/pom.xml b/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/pom.xml new file mode 100644 index 000000000..70e9a9b5d --- /dev/null +++ b/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + org.mule.migrated + ee_transform_01 + 1.0.0-M4-SNAPSHOT + mule-application + Application migrated with MMA + + + com.mulesoft.mule.modules + mule-compatibility-module + 1.4.0 + mule-plugin + + + + + mulesoft-releases + MuleSoft Releases Repository + https://repository.mulesoft.org/releases/ + + + anypoint-exchange + Anypoint Exchange + https://maven.anypoint.mulesoft.com/api/v1/maven + + + + + + true + + mulesoft-releases + MuleSoft Releases Repository + https://repository.mulesoft.org/releases/ + + + + + + org.mule.tools.maven + mule-maven-plugin + 3.2.1 + true + + + + + diff --git a/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/report/report.json b/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/report/report.json new file mode 100644 index 000000000..8c1da0522 --- /dev/null +++ b/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/report/report.json @@ -0,0 +1,45 @@ +{ + "projectType": "MULE_THREE_APPLICATION", + "projectName": "input", + "connectorsMigrated": [], + "numberOfMuleComponents": 4, + "numberOfMuleComponentsMigrated": 4, + "componentDetails": { + "mule": { + "success": 1, + "failure": 0 + }, + "logger": { + "success": 1, + "failure": 0 + }, + "flow": { + "success": 1, + "failure": 0 + }, + "ee:transform": { + "success": 1, + "failure": 0 + } + }, + "numberOfMELExpressions": 0, + "numberOfMELExpressionsMigrated": 0, + "numberOfMELExpressionLines": 0, + "numberOfMELExpressionLinesMigrated": 0, + "numberOfDWTransformations": 3, + "numberOfDWTransformationsMigrated": 3, + "numberOfDWTransformationLines": 22, + "numberOfDWTransformationLinesMigrated": 22, + "detailedMessages": [ + { + "level": "WARN", + "key": "transform.sessionVars", + "component": "compatibility:set-session-variable", + "lineNumber": 38, + "columnNumber": 106, + "message": "Instead of setting session variables in the flow, you must set Mule 4 variables.", + "filePath": "src/main/mule/mule-config.xml", + "documentationLinks": [] + } + ] +} \ No newline at end of file diff --git a/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/src/main/mule/mule-config.xml b/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/src/main/mule/mule-config.xml new file mode 100644 index 000000000..88c384f12 --- /dev/null +++ b/mule-migration-tool-e2e-tests/src/test/resources/e2e/ee_transform/ee_transform_01/output/src/main/mule/mule-config.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + +