Search in sources :

Example 1 with EuroSubFieldPackager

use of org.jpos.iso.packager.EuroSubFieldPackager in project jPOS by jpos.

the class MD5FilterTest method testFilter.

@Test
public void testFilter() throws Throwable {
    MD5Filter mD5Filter = new MD5Filter();
    mD5Filter.setConfiguration(new SimpleConfiguration());
    ISOMsg m = new ISOMsg("testMD5FilterMti");
    m.setDirection(2);
    ISOMsg result = mD5Filter.filter(new ASCIIChannel(new EuroSubFieldPackager()), m, new LogEvent());
    assertEquals("m.getMaxField()", 128, m.getMaxField());
    assertSame("result", m, result);
}
Also used : EuroSubFieldPackager(org.jpos.iso.packager.EuroSubFieldPackager) ISOMsg(org.jpos.iso.ISOMsg) ASCIIChannel(org.jpos.iso.channel.ASCIIChannel) LogEvent(org.jpos.util.LogEvent) SimpleConfiguration(org.jpos.core.SimpleConfiguration) Test(org.junit.Test)

Example 2 with EuroSubFieldPackager

use of org.jpos.iso.packager.EuroSubFieldPackager in project jPOS by jpos.

the class QMUXTest method testProcessUnhandled.

@Test
public void testProcessUnhandled() throws Throwable {
    ISOMsg m = new ISOMsg("testQMUXMti");
    m.setSource(new PADChannel(new EuroSubFieldPackager()));
    QMUX qMUX = new QMUX();
    qMUX.processUnhandled(m);
    assertEquals("qMUX.listeners.size()", 0, qMUX.listeners.size());
}
Also used : EuroSubFieldPackager(org.jpos.iso.packager.EuroSubFieldPackager) ISOMsg(org.jpos.iso.ISOMsg) PADChannel(org.jpos.iso.channel.PADChannel) Test(org.junit.Test)

Example 3 with EuroSubFieldPackager

use of org.jpos.iso.packager.EuroSubFieldPackager in project jPOS by jpos.

the class StatefulFilterTest method testFilterThrowsNullPointerException7.

@Test
public void testFilterThrowsNullPointerException7() throws Throwable {
    StatefulFilter statefulFilter = new StatefulFilter();
    statefulFilter.setKey(null);
    try {
        statefulFilter.filter(new BASE24TCPChannel(new EuroSubFieldPackager()), new ISOMsg(), new LogEvent(new PostPackager(), "testStatefulFilterTag"));
        fail("Expected NullPointerException to be thrown");
    } catch (NullPointerException ex) {
        assertNull("ex.getMessage()", ex.getMessage());
    }
}
Also used : BASE24TCPChannel(org.jpos.iso.channel.BASE24TCPChannel) EuroSubFieldPackager(org.jpos.iso.packager.EuroSubFieldPackager) ISOMsg(org.jpos.iso.ISOMsg) LogEvent(org.jpos.util.LogEvent) PostPackager(org.jpos.iso.packager.PostPackager) Test(org.junit.Test)

Aggregations

ISOMsg (org.jpos.iso.ISOMsg)3 EuroSubFieldPackager (org.jpos.iso.packager.EuroSubFieldPackager)3 Test (org.junit.Test)3 LogEvent (org.jpos.util.LogEvent)2 SimpleConfiguration (org.jpos.core.SimpleConfiguration)1 ASCIIChannel (org.jpos.iso.channel.ASCIIChannel)1 BASE24TCPChannel (org.jpos.iso.channel.BASE24TCPChannel)1 PADChannel (org.jpos.iso.channel.PADChannel)1 PostPackager (org.jpos.iso.packager.PostPackager)1