use of org.jpos.util.Logger in project jPOS by jpos.
the class XMLPackagerTest method onSetup.
@Before
public void onSetup() throws ISOException, NoSuchFieldException {
// PrintStream p = new PrintStream(new ByteArrayOutputStream())
xMLPackager = new XMLPackager();
atts = new Attributes2Impl();
logger = new Logger();
logger.addListener(new SimpleLogListener());
isoMsg = xMLPackager.createISOMsg();
xMLPackager.setLogger(logger, xMLPackager.getClass().getName());
isoMsg.setPackager(xMLPackager);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class VErrorParserTest method testSetLogger.
@Test
public void testSetLogger() throws Throwable {
VErrorParser vErrorParser = new VErrorParser();
Logger logger = new Logger();
vErrorParser.setLogger(logger, "testVErrorParserRealm");
assertSame("vErrorParser.logger", logger, vErrorParser.logger);
assertEquals("vErrorParser.realm", "testVErrorParserRealm", vErrorParser.realm);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class BaseChannelTest method testSetLogger.
@Test
public void testSetLogger() throws Throwable {
BaseChannel gZIPChannel = new GZIPChannel();
Logger logger = new Logger();
gZIPChannel.setLogger(logger, "testBaseChannelRealm");
assertSame("(GZIPChannel) gZIPChannel.logger", logger, ((GZIPChannel) gZIPChannel).logger);
assertEquals("(GZIPChannel) gZIPChannel.originalRealm", "testBaseChannelRealm", ((GZIPChannel) gZIPChannel).originalRealm);
assertEquals("(GZIPChannel) gZIPChannel.realm", "testBaseChannelRealm", ((GZIPChannel) gZIPChannel).realm);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class ConnectorTest method testGetLogger.
@Test
public void testGetLogger() throws Throwable {
Connector connector = new Connector();
Logger logger = new Logger();
connector.setLogger(logger, "testConnectorRealm");
Logger result = connector.getLogger();
assertSame("result", logger, result);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class ConnectorTest method testSetLogger.
@Test
public void testSetLogger() throws Throwable {
Connector connector = new Connector();
Logger logger = new Logger();
connector.setLogger(logger, "testConnectorRealm");
assertSame("connector.getLogger()", logger, connector.getLogger());
assertEquals("connector.getRealm()", "testConnectorRealm", connector.getRealm());
}
Aggregations