use of org.jpos.util.Log in project jPOS by jpos.
the class Q2Test method testGetLog.
@Test
public void testGetLog() throws Throwable {
Log result = m_q2.getLog();
assertEquals("result.getRealm()", "Q2.system", result.getRealm());
}
use of org.jpos.util.Log in project jPOS by jpos.
the class DUKPTTest method initLogger.
private void initLogger() {
Logger logger = new Logger();
logger.addListener(new SimpleLogListener());
log = new Log(logger, "SM Test");
}
use of org.jpos.util.Log in project jPOS by jpos.
the class Q2 method getLog.
public Log getLog() {
if (log == null) {
Logger logger = Logger.getLogger(LOGGER_NAME);
if (!hasSystemLogger && !logger.hasListeners() && cli == null)
logger.addListener(new SimpleLogListener(System.out));
log = new Log(logger, REALM);
}
return log;
}
use of org.jpos.util.Log in project jPOS by jpos.
the class Q2Test method testGetLog2.
@Test
public void testGetLog2() throws Throwable {
String[] args = new String[2];
args[0] = "testString";
args[1] = "testString";
m_q2 = new Q2(args);
Log log = m_q2.getLog();
Log result = m_q2.getLog();
assertSame("result", log, result);
}
use of org.jpos.util.Log in project jPOS by jpos.
the class QThreadPoolExecutorTest method setUp.
@Before
public void setUp() {
mockedLog = mock(Log.class);
qbean = new QThreadPoolExecutor() {
@Override
public Log getLog() {
return mockedLog;
}
@Override
public String getName() {
return QBEAN_DEFAULT_NAME;
}
};
qbeanConfigBos = new ByteArrayOutputStream();
qbeanConfigPw = new PrintWriter(new OutputStreamWriter(qbeanConfigBos));
NameRegistrar.getAsMap().clear();
}
Aggregations