Search in sources :

Example 26 with ISOMsg

use of org.jpos.iso.ISOMsg in project jPOS by jpos.

the class VErrorParserTest method testGetVErrors3.

@SuppressWarnings("unchecked")
@Test
public void testGetVErrors3() throws Throwable {
    VErrorParser vErrorParser = new VErrorParser();
    ISOMsg c = new ISOMsg();
    c.set(100, "testVErrorParserValue");
    Vector result = vErrorParser.getVErrors(c);
    assertEquals("result.size()", 0, result.size());
}
Also used : ISOMsg(org.jpos.iso.ISOMsg) Vector(java.util.Vector) Test(org.junit.Test)

Example 27 with ISOMsg

use of org.jpos.iso.ISOMsg in project jPOS by jpos.

the class VErrorParserTest method testGetVErrors4.

@SuppressWarnings("unchecked")
@Test
public void testGetVErrors4() throws Throwable {
    VErrorParser vErrorParser = new VErrorParser();
    ISOComponent c = new ISOMsg();
    Vector result = vErrorParser.getVErrors(c);
    assertEquals("(ISOMsg) c.getMaxField()", 0, c.getMaxField());
    assertEquals("result.size()", 0, result.size());
}
Also used : ISOComponent(org.jpos.iso.ISOComponent) ISOMsg(org.jpos.iso.ISOMsg) Vector(java.util.Vector) Test(org.junit.Test)

Example 28 with ISOMsg

use of org.jpos.iso.ISOMsg in project jPOS by jpos.

the class VErrorParserTest method testGetVErrors.

@SuppressWarnings("unchecked")
@Test
public void testGetVErrors() throws Throwable {
    VErrorParser vErrorParser = new VErrorParser();
    Vector result = vErrorParser.getVErrors(new ISOVMsg(new ISOMsg("testVErrorParserMti")));
    assertEquals("result.size()", 0, result.size());
}
Also used : ISOMsg(org.jpos.iso.ISOMsg) ISOVMsg(org.jpos.iso.ISOVMsg) Vector(java.util.Vector) Test(org.junit.Test)

Example 29 with ISOMsg

use of org.jpos.iso.ISOMsg in project jPOS by jpos.

the class ChannelAdaptorTest method receivePullsMessageFromUnderlyingChannel.

@Test
public void receivePullsMessageFromUnderlyingChannel() throws Exception {
    StubISOChannel stubISOChannel = new StubISOChannel();
    channelAdaptor = configureAndStart(new ChannelAdaptorWithoutQ2(stubISOChannel));
    stubISOChannel.receiveQueue.add(new ISOMsg("0800"));
    assertThat(channelAdaptor.receive(1000), hasMti("0800"));
}
Also used : ISOMsg(org.jpos.iso.ISOMsg) Test(org.junit.Test)

Example 30 with ISOMsg

use of org.jpos.iso.ISOMsg in project jPOS by jpos.

the class QMUXTest method testProcessUnhandled1.

@Test
public void testProcessUnhandled1() throws Throwable {
    QMUX qMUX = new QMUX();
    ISOMsg m = new ISOMsg("testQMUXMti");
    qMUX.processUnhandled(m);
    assertNull("qMUX.sp", qMUX.sp);
    assertEquals("qMUX.listeners.size()", 0, qMUX.listeners.size());
    assertEquals("m.getDirection()", 0, m.getDirection());
}
Also used : ISOMsg(org.jpos.iso.ISOMsg) Test(org.junit.Test)

Aggregations

ISOMsg (org.jpos.iso.ISOMsg)223 Test (org.junit.Test)191 LogEvent (org.jpos.util.LogEvent)41 ISOBaseValidator (org.jpos.iso.ISOBaseValidator)30 ISOException (org.jpos.iso.ISOException)29 ISOComponent (org.jpos.iso.ISOComponent)25 ISOVMsg (org.jpos.iso.ISOVMsg)22 ISOFieldValidator (org.jpos.iso.ISOFieldValidator)21 Context (org.jpos.transaction.Context)20 ISOValidator (org.jpos.iso.ISOValidator)18 Result (org.jpos.rc.Result)17 SimpleConfiguration (org.jpos.core.SimpleConfiguration)15 ISOFieldPackager (org.jpos.iso.ISOFieldPackager)12 TEST0100 (org.jpos.iso.validator.TEST0100)12 FileInputStream (java.io.FileInputStream)9 Vector (java.util.Vector)9 PostChannel (org.jpos.iso.channel.PostChannel)9 MSGTEST (org.jpos.iso.validator.MSGTEST)9 MSGTEST02 (org.jpos.iso.validator.MSGTEST02)9 ISOFilter (org.jpos.iso.ISOFilter)8