Search in sources :

Example 6 with XsltSender

use of nl.nn.adapterframework.senders.XsltSender in project iaf by ibissource.

the class XmlFileElementIteratorPipeTest method testElementChain.

@Test
public void testElementChain() throws Exception {
    XsltSender sender = new XsltSender();
    sender.setXpathExpression("concat(Person/PersonName/Id,'_',Person/Demographics/Gender)");
    pipe.setSender(sender);
    pipe.setElementChain("GetPartiesOnAgreementRLY;PartyAgreementRole;PartyInternalAgreementRole;Party;Person");
    pipe.configure();
    pipe.start();
    URL input = TestFileUtils.getTestFileURL("/XmlFileElementIteratorPipe/input.xml");
    File file = new File(input.toURI());
    String expected = TestFileUtils.getTestFile("/XmlFileElementIteratorPipe/ElementChainOutput.xml");
    PipeRunResult prr = doPipe(pipe, file.toString(), session);
    String result = Message.asString(prr.getResult());
    TestAssertions.assertEqualsIgnoreCRLF(expected, result);
}
Also used : PipeRunResult(nl.nn.adapterframework.core.PipeRunResult) XsltSender(nl.nn.adapterframework.senders.XsltSender) File(java.io.File) URL(java.net.URL) Test(org.junit.Test)

Aggregations

XsltSender (nl.nn.adapterframework.senders.XsltSender)6 File (java.io.File)4 URL (java.net.URL)4 PipeRunResult (nl.nn.adapterframework.core.PipeRunResult)4 Test (org.junit.Test)4 SenderPipe (nl.nn.adapterframework.pipes.SenderPipe)2 Parameter (nl.nn.adapterframework.parameters.Parameter)1 SenderSeries (nl.nn.adapterframework.senders.SenderSeries)1