use of org.jpos.util.Logger in project jPOS by jpos.
the class ChannelPoolTest method testIsConnectedDoNotThrowNullPointerExceptionWithNullLogListener.
@Test
public void testIsConnectedDoNotThrowNullPointerExceptionWithNullLogListener() throws Throwable {
Logger logger = new Logger();
logger.addListener(null);
ChannelPool channelPool = new ChannelPool();
channelPool.setLogger(logger, "testChannelPoolRealm");
assertEquals("connected.isFalse", false, channelPool.isConnected());
assertNull("channelPool.current", channelPool.current);
assertEquals("channelPool.pool.size()", 0, channelPool.pool.size());
assertTrue("channelPool.usable", channelPool.usable);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class ChannelPoolTest method testGetRealm1.
@Test
public void testGetRealm1() throws Throwable {
ChannelPool channelPool = new ChannelPool();
channelPool.setLogger(new Logger(), "testChannelPoolRealm");
String result = channelPool.getRealm();
assertEquals("result", "testChannelPoolRealm", result);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class ChannelPoolTest method testGetLogger.
@Test
public void testGetLogger() throws Throwable {
ChannelPool channelPool = new ChannelPool();
Logger logger = new Logger();
channelPool.setLogger(logger, "testChannelPoolRealm");
Logger result = channelPool.getLogger();
assertSame("result", logger, result);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class LoopbackChannelTest method testGetRealm.
@Test
public void testGetRealm() throws Throwable {
LoopbackChannel loopbackChannel = new LoopbackChannel();
loopbackChannel.setLogger(new Logger(), "testLoopbackChannelRealm");
String result = loopbackChannel.getRealm();
assertEquals("result", "testLoopbackChannelRealm", result);
}
use of org.jpos.util.Logger in project jPOS by jpos.
the class LoopbackChannelTest method testSetLogger.
@Test
public void testSetLogger() throws Throwable {
LoopbackChannel loopbackChannel = new LoopbackChannel();
Logger logger = new Logger();
loopbackChannel.setLogger(logger, "testLoopbackChannelRealm");
assertSame("loopbackChannel.logger", logger, loopbackChannel.logger);
assertEquals("loopbackChannel.realm", "testLoopbackChannelRealm", loopbackChannel.realm);
}
Aggregations