Search in sources :

Example 31 with Logger

use of org.jpos.util.Logger in project jPOS by jpos.

the class ISOBasePackagerTest method testGetLogger.

@Test
public void testGetLogger() {
    Logger logger = mock(Logger.class);
    iSOBasePackager.setLogger(logger, "testRealm");
    assertThat(iSOBasePackager.getLogger(), is(logger));
}
Also used : Logger(org.jpos.util.Logger) Test(org.junit.Test)

Example 32 with Logger

use of org.jpos.util.Logger in project jPOS by jpos.

the class SslChannelIntegrationTest method setUp.

@Before
public void setUp() throws Exception {
    logger = new Logger();
    logger.addListener(new SimpleLogListener());
}
Also used : SimpleLogListener(org.jpos.util.SimpleLogListener) Logger(org.jpos.util.Logger) Before(org.junit.Before)

Example 33 with Logger

use of org.jpos.util.Logger in project jPOS by jpos.

the class ChannelPoolTest method testSetLogger.

@Test
public void testSetLogger() throws Throwable {
    ChannelPool channelPool = new ChannelPool();
    Logger logger = new Logger();
    channelPool.setLogger(logger, "testChannelPoolRealm");
    assertSame("channelPool.logger", logger, channelPool.logger);
    assertEquals("channelPool.realm", "testChannelPoolRealm", channelPool.realm);
}
Also used : Logger(org.jpos.util.Logger) Test(org.junit.Test)

Example 34 with Logger

use of org.jpos.util.Logger in project jPOS by jpos.

the class LoopbackChannelTest method testGetLogger.

@Test
public void testGetLogger() throws Throwable {
    LoopbackChannel loopbackChannel = new LoopbackChannel();
    Logger logger = new Logger();
    loopbackChannel.setLogger(logger, "testLoopbackChannelRealm");
    Logger result = loopbackChannel.getLogger();
    assertSame("result", logger, result);
}
Also used : Logger(org.jpos.util.Logger) Test(org.junit.Test)

Example 35 with Logger

use of org.jpos.util.Logger in project jPOS by jpos.

the class BaseSMAdapterTest method testGetRealm.

@Test
public void testGetRealm() throws Throwable {
    BaseSMAdapter jCESecurityModule = new BaseSMAdapter();
    jCESecurityModule.setLogger(new Logger(), "testBaseSMAdapterRealm");
    String result = jCESecurityModule.getRealm();
    assertEquals("result", "testBaseSMAdapterRealm", result);
}
Also used : Logger(org.jpos.util.Logger) Test(org.junit.Test)

Aggregations

Logger (org.jpos.util.Logger)45 Test (org.junit.Test)36 SimpleConfiguration (org.jpos.core.SimpleConfiguration)7 SubConfiguration (org.jpos.core.SubConfiguration)5 ISOMsg (org.jpos.iso.ISOMsg)5 SimpleLogListener (org.jpos.util.SimpleLogListener)5 Properties (java.util.Properties)4 Configuration (org.jpos.core.Configuration)4 ISOFieldPackager (org.jpos.iso.ISOFieldPackager)4 ISOException (org.jpos.iso.ISOException)3 ConfigurationException (org.jpos.core.ConfigurationException)2 GZIPChannel (org.jpos.iso.channel.GZIPChannel)2 Log (org.jpos.util.Log)2 NameRegistrar (org.jpos.util.NameRegistrar)2 Before (org.junit.Before)2 PrintStream (java.io.PrintStream)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 IFA_LLLLCHAR (org.jpos.iso.IFA_LLLLCHAR)1 IFE_CHAR (org.jpos.iso.IFE_CHAR)1