use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class QMUXTest method testInitServiceWithoutListeners.
@Test
public void testInitServiceWithoutListeners() throws Throwable {
QMUX mux = new QMUX();
Configuration cfg = new SimpleConfiguration();
mux.setConfiguration(cfg);
Element persist = new Element("testQMUXName");
persist.addContent(new Element("in").addContent("queue-in"));
persist.addContent(new Element("out").addContent("queue-out"));
persist.addContent(new Element("unhandled").addContent("queue-unhandled"));
persist.addContent(new Element("ready").addContent("test-ready"));
persist.addContent(new Element("unhandled").addContent("queue-unhandled"));
mux.setPersist(persist);
mux.initService();
assertEquals("queue-unhandled", mux.unhandled);
assertEquals("queue-out", mux.out);
assertEquals("queue-in", mux.in);
assertNull(mux.ignorerc);
assertNotNull(mux.sp);
assertFalse(mux.isModified());
assertArrayEquals(new String[] { "test-ready" }, mux.ready);
assertArrayEquals(new String[] { "41", "11" }, mux.key);
assertEquals(0, mux.listeners.size());
}
Aggregations