use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.Document in project mule-migration-assistant by mulesoft.
the class ScriptingModuleMigrationTest method executeScriptWithParams.
@Test
public void executeScriptWithParams() throws Exception {
Document doc = getDocument(this.getClass().getClassLoader().getResource(SCRIPTING_SAMPLE_PATH.toString()).toURI().getPath());
node = getElementsFromDocument(doc, scriptingModuleMigration.getAppliedTo().getExpression()).get(0);
scriptingModuleMigration.execute(node, report.getReport());
assertThat("The name didn't change.", node.getName(), equalTo("execute"));
assertThat("The attributes weren't moved..", node.getChildren().get(1).getName(), equalTo("parameters"));
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.Document in project mule-migration-assistant by mulesoft.
the class AssertNotEqualsTest method execute.
@Test
public void execute() throws Exception {
Document doc = getDocument(this.getClass().getClassLoader().getResource(MUNIT_SAMPLE_PATH.toString()).toURI().getPath());
node = getElementsFromDocument(doc, assertNotEquals.getAppliedTo().getExpression()).get(0);
assertNotEquals.execute(node, report.getReport());
assertThat("The node didn't change", node.getName(), is("assert-that"));
assertThat("The attribute didn't change", node.getAttribute("is").getValue(), is("#[MunitTools::not(MUnitTools::equalTo(2))]"));
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.Document in project mule-migration-assistant by mulesoft.
the class AssertPayloadTest method execute.
@Test
public void execute() throws Exception {
Document doc = getDocument(this.getClass().getClassLoader().getResource(MUNIT_SAMPLE_PATH.toString()).toURI().getPath());
node = getElementsFromDocument(doc, assertPayloadEquals.getAppliedTo().getExpression()).get(0);
assertPayloadEquals.execute(node, report.getReport());
assertThat("The node didn't change", node.getName(), is("assert-that"));
assertThat("The attribute didn't change", node.getAttribute("expression").getValue(), is("#[payload]"));
assertThat("The attribute didn't change", node.getAttribute("is").getValue(), is("#[MunitTools::equalTo(2)]"));
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.Document in project mule-migration-assistant by mulesoft.
the class AssertTrueTest method execute.
@Test
public void execute() throws Exception {
Document doc = getDocument(this.getClass().getClassLoader().getResource(MUNIT_SAMPLE_PATH.toString()).toURI().getPath());
node = getElementsFromDocument(doc, assertTrue.getAppliedTo().getExpression()).get(0);
assertTrue.execute(node, report.getReport());
assertThat("The node didn't change", node.getName(), is("assert-that"));
assertThat("The attribute didn't change", node.getAttribute("is"), is(notNullValue()));
assertThat("The attribute didn't change", node.getAttribute("is").getValue(), is("#[MunitTools::equalTo(true)]"));
}
use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.Document in project mule-migration-assistant by mulesoft.
the class MUnitTestTest method validateTestStructure.
@Test
public void validateTestStructure() throws Exception {
Document doc = getDocument(this.getClass().getClassLoader().getResource(MUNIT_SAMPLE_PATH.toString()).toURI().getPath());
node = getElementsFromDocument(doc, munitTest.getAppliedTo().getExpression()).get(0);
munitTest.execute(node, report.getReport());
assertThat("The munit test not contains sections.", node.getChildren().size(), is(3));
assertThat("The munit test not contains sections.", node.getChildren().get(0).getName(), is("behavior"));
assertThat("The munit test not contains sections.", node.getChildren().get(1).getName(), is("execution"));
assertThat("The munit test not contains sections.", node.getChildren().get(2).getName(), is("validation"));
}
Aggregations