Search in sources :

Example 16 with SimpleConfiguration

use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.

the class BaseChannelTest method testSetConfiguration1.

@Test
public void testSetConfiguration1() throws Throwable {
    BaseChannel gZIPChannel = new GZIPChannel();
    gZIPChannel.setConfiguration(new SimpleConfiguration());
    assertEquals(300000, gZIPChannel.getTimeout(), "(GZIPChannel) gZIPChannel.getTimeout()");
    assertEquals(100000, gZIPChannel.getMaxPacketLength(), "(GZIPChannel) gZIPChannel.getMaxPacketLength()");
    assertFalse(((GZIPChannel) gZIPChannel).overrideHeader, "(GZIPChannel) gZIPChannel.overrideHeader");
}
Also used : SimpleConfiguration(org.jpos.core.SimpleConfiguration) GZIPChannel(org.jpos.iso.channel.GZIPChannel) Test(org.junit.jupiter.api.Test)

Example 17 with SimpleConfiguration

use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.

the class BSHLogListenerTest method testSetConfiguration.

@Test
public void testSetConfiguration() throws Throwable {
    BSHLogListener bSHLogListener = new BSHLogListener();
    Configuration cfg = new SimpleConfiguration(new Properties());
    bSHLogListener.setConfiguration(cfg);
    assertSame(cfg, bSHLogListener.cfg, "bSHLogListener.cfg");
}
Also used : SimpleConfiguration(org.jpos.core.SimpleConfiguration) Configuration(org.jpos.core.Configuration) SimpleConfiguration(org.jpos.core.SimpleConfiguration) Properties(java.util.Properties) Test(org.junit.jupiter.api.Test)

Example 18 with SimpleConfiguration

use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.

the class BSHFilterTest method testFilter1.

@Test
public void testFilter1() throws Throwable {
    BSHFilter bSHFilter = new BSHFilter();
    Configuration cfg = new SimpleConfiguration();
    bSHFilter.setConfiguration(cfg);
    ISOChannel channel = new CSChannel();
    LogEvent evt = new LogEvent();
    ISOVMsg result = (ISOVMsg) bSHFilter.filter(channel, m, evt);
    assertSame(m, result, "result");
    assertSame(cfg, bSHFilter.cfg, "bSHFilter.cfg");
}
Also used : SimpleConfiguration(org.jpos.core.SimpleConfiguration) Configuration(org.jpos.core.Configuration) LogEvent(org.jpos.util.LogEvent) SimpleConfiguration(org.jpos.core.SimpleConfiguration) ISOVMsg(org.jpos.iso.ISOVMsg) ISOChannel(org.jpos.iso.ISOChannel) CSChannel(org.jpos.iso.channel.CSChannel) Test(org.junit.jupiter.api.Test)

Example 19 with SimpleConfiguration

use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.

the class BSHFilterTest method testSetConfiguration.

@Test
public void testSetConfiguration() throws Throwable {
    BSHFilter bSHFilter = new BSHFilter();
    Configuration cfg = new SimpleConfiguration();
    bSHFilter.setConfiguration(cfg);
    assertSame(cfg, bSHFilter.cfg, "bSHFilter.cfg");
}
Also used : SimpleConfiguration(org.jpos.core.SimpleConfiguration) Configuration(org.jpos.core.Configuration) SimpleConfiguration(org.jpos.core.SimpleConfiguration) Test(org.junit.jupiter.api.Test)

Example 20 with SimpleConfiguration

use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.

the class BSHRequestListenerTest method testSetConfiguration.

@Test
public void testSetConfiguration() throws Throwable {
    BSHRequestListener bSHRequestListener = new BSHRequestListener();
    Configuration cfg = new SimpleConfiguration();
    bSHRequestListener.setConfiguration(cfg);
    assertEquals(1, bSHRequestListener.whitelist.size(), "bSHRequestListener.whitelist.size()");
    assertEquals(0, bSHRequestListener.bshSource.length, "bSHRequestListener.bshSource.length");
    assertSame(cfg, bSHRequestListener.cfg, "bSHRequestListener.cfg");
}
Also used : SubConfiguration(org.jpos.core.SubConfiguration) SimpleConfiguration(org.jpos.core.SimpleConfiguration) Configuration(org.jpos.core.Configuration) SimpleConfiguration(org.jpos.core.SimpleConfiguration) Test(org.junit.jupiter.api.Test)

Aggregations

SimpleConfiguration (org.jpos.core.SimpleConfiguration)71 Test (org.junit.jupiter.api.Test)59 Configuration (org.jpos.core.Configuration)25 Properties (java.util.Properties)16 SubConfiguration (org.jpos.core.SubConfiguration)15 ISOMsg (org.jpos.iso.ISOMsg)14 LogEvent (org.jpos.util.LogEvent)14 ConfigurationException (org.jpos.core.ConfigurationException)9 ASCIIChannel (org.jpos.iso.channel.ASCIIChannel)7 Logger (org.jpos.util.Logger)7 ISOFilter (org.jpos.iso.ISOFilter)6 GZIPChannel (org.jpos.iso.channel.GZIPChannel)4 ISOBaseValidatingPackager (org.jpos.iso.packager.ISOBaseValidatingPackager)4 PostChannel (org.jpos.iso.channel.PostChannel)3 PostPackager (org.jpos.iso.packager.PostPackager)3 XMLPackager (org.jpos.iso.packager.XMLPackager)3 Element (org.jdom2.Element)2 BASE24TCPChannel (org.jpos.iso.channel.BASE24TCPChannel)2 LogChannel (org.jpos.iso.channel.LogChannel)2 PADChannel (org.jpos.iso.channel.PADChannel)2