use of com.mulesoft.tools.migration.library.soapkit.steps.AbstractSoapkitMigrationStep in project mule-migration-assistant by mulesoft.
the class SoapkitMigrationTest method setUp.
@Before
public void setUp() throws Exception {
final ApplicationModel applicationModel = getApplicationModel();
final SoapkitMigrationTask soapkitMigrationTask = new SoapkitMigrationTask();
steps = soapkitMigrationTask.getSteps().stream().filter(step -> step instanceof AbstractSoapkitMigrationStep).collect(toList());
steps.forEach(step -> ((AbstractSoapkitMigrationStep) step).setApplicationModel(applicationModel));
}
use of com.mulesoft.tools.migration.library.soapkit.steps.AbstractSoapkitMigrationStep in project mule-migration-assistant by mulesoft.
the class SoapkitMigrationTest method execute.
@Test
public void execute() throws Exception {
Document doc = getDocument(this.getClass().getClassLoader().getResource(configPath.toString()).toURI().getPath());
steps.forEach(step -> getElementsFromDocument(doc, ((AbstractSoapkitMigrationStep) step).getAppliedTo().getExpression()).forEach(node -> step.execute(node, mock(MigrationReport.class))));
XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
String xmlString = outputter.outputString(doc);
assertThat(xmlString, isSimilarTo(IOUtils.toString(this.getClass().getClassLoader().getResource(targetPath.toString()).toURI(), UTF_8)).ignoreComments().normalizeWhitespace());
}
Aggregations