Search in sources :

Example 6 with SenderWrapperBase

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

the class InputOutputSenderWrapperProcessorTest method testGetInputFromFixedValuePreserveStoreResult.

@Test
public void testGetInputFromFixedValuePreserveStoreResult() throws Exception {
    SenderWrapperBase sender = getSenderWrapper();
    sender.setGetInputFromFixedValue("def");
    sender.setPreserveInput(true);
    sender.setStoreResultInSessionKey("storedResult");
    String input = "abc";
    String expectedSecondSenderOutput = "Sender 2: [Sender 1: [def]]";
    String expectedWrapperOutput = "abc";
    String expectedSessionKeyValue = expectedSecondSenderOutput;
    testInputOutputSenderWrapperProcessor(sender, input, expectedSecondSenderOutput, expectedWrapperOutput, expectedSessionKeyValue);
}
Also used : SenderWrapperBase(nl.nn.adapterframework.senders.SenderWrapperBase) Test(org.junit.Test)

Example 7 with SenderWrapperBase

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

the class InputOutputSenderWrapperProcessorTest method testStoreInput.

@Test
public void testStoreInput() throws Exception {
    SenderWrapperBase sender = getSenderWrapper();
    sender.setStoreInputInSessionKey("storedResult");
    String input = "abc";
    String expectedSecondSenderOutput = "Sender 2: [Sender 1: [abc]]";
    String expectedWrapperOutput = expectedSecondSenderOutput;
    String expectedSessionKeyValue = input;
    testInputOutputSenderWrapperProcessor(sender, input, expectedSecondSenderOutput, expectedWrapperOutput, expectedSessionKeyValue);
}
Also used : SenderWrapperBase(nl.nn.adapterframework.senders.SenderWrapperBase) Test(org.junit.Test)

Example 8 with SenderWrapperBase

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

the class InputOutputSenderWrapperProcessorTest method testBasic.

@Test
public void testBasic() throws Exception {
    SenderWrapperBase sender = getSenderWrapper();
    String input = "abc";
    String expectedSecondSenderOutput = "Sender 2: [Sender 1: [abc]]";
    String expectedWrapperOutput = expectedSecondSenderOutput;
    String expectedSessionKeyValue = null;
    testInputOutputSenderWrapperProcessor(sender, input, expectedSecondSenderOutput, expectedWrapperOutput, expectedSessionKeyValue);
}
Also used : SenderWrapperBase(nl.nn.adapterframework.senders.SenderWrapperBase) Test(org.junit.Test)

Example 9 with SenderWrapperBase

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

the class InputOutputSenderWrapperProcessorTest method testBasicStoreResult.

@Test
public void testBasicStoreResult() throws Exception {
    SenderWrapperBase sender = getSenderWrapper();
    sender.setStoreResultInSessionKey("storedResult");
    String input = "abc";
    String expectedSecondSenderOutput = "Sender 2: [Sender 1: [abc]]";
    String expectedWrapperOutput = expectedSecondSenderOutput;
    String expectedSessionKeyValue = expectedSecondSenderOutput;
    testInputOutputSenderWrapperProcessor(sender, input, expectedSecondSenderOutput, expectedWrapperOutput, expectedSessionKeyValue);
}
Also used : SenderWrapperBase(nl.nn.adapterframework.senders.SenderWrapperBase) Test(org.junit.Test)

Example 10 with SenderWrapperBase

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

the class InputOutputSenderWrapperProcessorTest method testBasicPreserveStoreResult.

@Test
public void testBasicPreserveStoreResult() throws Exception {
    SenderWrapperBase sender = getSenderWrapper();
    sender.setPreserveInput(true);
    sender.setStoreResultInSessionKey("storedResult");
    String input = "abc";
    String expectedSecondSenderOutput = "Sender 2: [Sender 1: [abc]]";
    String expectedWrapperOutput = "abc";
    String expectedSessionKeyValue = expectedSecondSenderOutput;
    testInputOutputSenderWrapperProcessor(sender, input, expectedSecondSenderOutput, expectedWrapperOutput, expectedSessionKeyValue);
}
Also used : SenderWrapperBase(nl.nn.adapterframework.senders.SenderWrapperBase) Test(org.junit.Test)

Aggregations

SenderWrapperBase (nl.nn.adapterframework.senders.SenderWrapperBase)11 Test (org.junit.Test)9 INamedObject (nl.nn.adapterframework.core.INamedObject)1 ISender (nl.nn.adapterframework.core.ISender)1 IWithParameters (nl.nn.adapterframework.core.IWithParameters)1 PipeLineSession (nl.nn.adapterframework.core.PipeLineSession)1 PipeRunResult (nl.nn.adapterframework.core.PipeRunResult)1 JmsSender (nl.nn.adapterframework.jms.JmsSender)1 ParameterList (nl.nn.adapterframework.parameters.ParameterList)1 Message (nl.nn.adapterframework.stream.Message)1