Search in sources :

Example 1 with Logger

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

the class BaseChannelTest method testSetLogger1.

@Test
public void testSetLogger1() throws Throwable {
    BaseChannel gZIPChannel = new GZIPChannel();
    Logger logger = new Logger();
    gZIPChannel.setLogger(logger, "testBaseChannelRealm");
    gZIPChannel.setLogger(logger, "testBaseChannelRealm");
    assertSame("(GZIPChannel) gZIPChannel.logger", logger, ((GZIPChannel) gZIPChannel).logger);
    assertEquals("(GZIPChannel) gZIPChannel.realm", "testBaseChannelRealm", ((GZIPChannel) gZIPChannel).realm);
}
Also used : GZIPChannel(org.jpos.iso.channel.GZIPChannel) Logger(org.jpos.util.Logger) Test(org.junit.Test)

Example 2 with Logger

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

the class ISOBasePackagerTest method testGetRealm.

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

Example 3 with Logger

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

the class XMLPackagerTest method testGetLogger.

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

Example 4 with Logger

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

the class VErrorParserTest method testGetRealm1.

@Test
public void testGetRealm1() throws Throwable {
    VErrorParser vErrorParser = new VErrorParser();
    vErrorParser.setLogger(new Logger(), "testVErrorParserRealm");
    String result = vErrorParser.getRealm();
    assertEquals("result", "testVErrorParserRealm", result);
}
Also used : Logger(org.jpos.util.Logger) Test(org.junit.Test)

Example 5 with Logger

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

the class VErrorParserTest method testGetLogger.

@Test
public void testGetLogger() throws Throwable {
    VErrorParser vErrorParser = new VErrorParser();
    Logger logger = new Logger();
    vErrorParser.setLogger(logger, "testVErrorParserRealm");
    Logger result = vErrorParser.getLogger();
    assertSame("result", logger, 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