use of com.mulesoft.tools.migration.library.munit.tasks.MunitMigrationTask in project mule-migration-assistant by mulesoft.
the class MigrationTaskLocator method getCoreMigrationTasks.
public List<AbstractMigrationTask> getCoreMigrationTasks() {
List<AbstractMigrationTask> coreMigrationTasks = new ArrayList<>();
coreMigrationTasks.add(new SecurePropertiesMigrationTask());
coreMigrationTasks.add(new SecurityCrc32MigrationTask());
coreMigrationTasks.add(new SecurityFiltersMigrationTask());
coreMigrationTasks.add(new PropertiesMigrationTask());
coreMigrationTasks.add(new MuleCoreComponentsMigrationTask());
coreMigrationTasks.add(new SplitterAggregatorTask());
coreMigrationTasks.add(new BatchMigrationTask());
coreMigrationTasks.add(new ValidationMigrationTask());
coreMigrationTasks.add(new RequestReplyMigrationTask());
coreMigrationTasks.add(new QuartzMigrationTask());
coreMigrationTasks.add(new HTTPMigrationTask());
coreMigrationTasks.add(new EmailMigrationTask());
coreMigrationTasks.add(new SocketsMigrationTask());
coreMigrationTasks.add(new WscMigrationTask());
coreMigrationTasks.add(new DbMigrationTask());
coreMigrationTasks.add(new ObjectStoreMigrationTask());
coreMigrationTasks.add(new FileMigrationTask());
coreMigrationTasks.add(new FtpMigrationTask());
coreMigrationTasks.add(new SftpMigrationTask());
coreMigrationTasks.add(new EndpointsMigrationTask());
coreMigrationTasks.add(new JmsDomainMigrationTask());
coreMigrationTasks.add(new JmsMigrationTask());
coreMigrationTasks.add(new AmqpMigrationTask());
coreMigrationTasks.add(new VmDomainMigrationTask());
coreMigrationTasks.add(new VMMigrationTask());
coreMigrationTasks.add(new CompressionMigrationTask());
coreMigrationTasks.add(new ScriptingMigrationTask());
coreMigrationTasks.add(new JsonMigrationTask());
coreMigrationTasks.add(new SecurityOAuth2ProviderMigrationTask());
coreMigrationTasks.add(new SalesforceMigrationTask());
coreMigrationTasks.add(new DomainAppMigrationTask());
coreMigrationTasks.add(new MuleDeprecatedCoreComponentsMigrationTask());
coreMigrationTasks.add(new MunitMigrationTask());
coreMigrationTasks.add(new TransformersMigrationTask());
coreMigrationTasks.add(new ExpressionTransformerMigrationTask());
coreMigrationTasks.add(new ApikitMigrationTask());
coreMigrationTasks.add(new SoapkitMigrationTask());
return coreMigrationTasks;
}
use of com.mulesoft.tools.migration.library.munit.tasks.MunitMigrationTask in project mule-migration-assistant by mulesoft.
the class MigrationJobTest method assertProjectGav.
private void assertProjectGav(Path projectPath, String gav, String expectedGroupId, String expectedArtifactId, String expectedVersion) throws Exception {
migrationJob = new MigrationJob.MigrationJobBuilder().withProject(projectPath).withOutputProject(migratedProjectPath).withInputVersion(MULE_380_VERSION).withOuputVersion(MULE_413_VERSION).withProjectGAV(gav).build();
MunitMigrationTask migrationTask = new MunitMigrationTask();
migrationTasks.add(migrationTask);
Whitebox.setInternalState(migrationJob, "migrationTasks", migrationTasks);
migrationJob.execute(new DefaultMigrationReport());
assertThat(migrationTask.getApplicationModel().getPomModel().get().getGroupId(), is(expectedGroupId));
assertThat(migrationTask.getApplicationModel().getPomModel().get().getArtifactId(), is(expectedArtifactId));
assertThat(migrationTask.getApplicationModel().getPomModel().get().getVersion(), is(expectedVersion));
}
use of com.mulesoft.tools.migration.library.munit.tasks.MunitMigrationTask in project mule-migration-assistant by mulesoft.
the class MigrationTaskLocatorTest method locateFromAnyToAny.
@Test
public void locateFromAnyToAny() {
MigrationTaskLocator migrationTaskLocator = new MigrationTaskLocator(ANY_VERSION_3, ANY_VERSION_4);
List<AbstractMigrationTask> migrationTaskList = migrationTaskLocator.locate();
assertThat("The number of migration task is wrong", migrationTaskList.size(), greaterThanOrEqualTo(9));
MigrationTask migrationTask = migrationTaskList.stream().filter(t -> t instanceof MunitMigrationTask).findFirst().get();
assertThat("The migration task from is wrong", isVersionGreaterOrEquals(migrationTask.getFrom(), from), is(true));
assertThat("The migration task to is wrong", isVersionGreaterOrEquals(to, migrationTask.getTo()), is(true));
assertThat("The migration task project type is wrong", migrationTask.getProjectType(), is(projectType));
}
use of com.mulesoft.tools.migration.library.munit.tasks.MunitMigrationTask in project mule-migration-assistant by mulesoft.
the class MigrationJobTest method executeCheckApplicationModel.
@Test
public void executeCheckApplicationModel() throws Exception {
migrationJob = new MigrationJob.MigrationJobBuilder().withProject(originalProjectPath).withOutputProject(migratedProjectPath).withInputVersion(MULE_380_VERSION).withOuputVersion(MULE_413_VERSION).build();
MunitMigrationTask migrationTask = new MunitMigrationTask();
migrationTasks.add(migrationTask);
Whitebox.setInternalState(migrationJob, "migrationTasks", migrationTasks);
migrationJob.execute(new DefaultMigrationReport());
assertThat("The application model generated is wrong.", migrationTask.getApplicationModel().getApplicationDocuments().size(), is(2));
}
Aggregations