Search in sources :

Example 71 with SimpleConfiguration

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());
}
Also used : SimpleConfiguration(org.jpos.core.SimpleConfiguration) Configuration(org.jpos.core.Configuration) Element(org.jdom2.Element) SimpleConfiguration(org.jpos.core.SimpleConfiguration) Test(org.junit.jupiter.api.Test)

Aggregations

SimpleConfiguration (org.jpos.core.SimpleConfiguration)71 Test (org.junit.jupiter.api.Test)59 Configuration (org.jpos.core.Configuration)25 Properties (java.util.Properties)16 SubConfiguration (org.jpos.core.SubConfiguration)15 ISOMsg (org.jpos.iso.ISOMsg)14 LogEvent (org.jpos.util.LogEvent)14 ConfigurationException (org.jpos.core.ConfigurationException)9 ASCIIChannel (org.jpos.iso.channel.ASCIIChannel)7 Logger (org.jpos.util.Logger)7 ISOFilter (org.jpos.iso.ISOFilter)6 GZIPChannel (org.jpos.iso.channel.GZIPChannel)4 ISOBaseValidatingPackager (org.jpos.iso.packager.ISOBaseValidatingPackager)4 PostChannel (org.jpos.iso.channel.PostChannel)3 PostPackager (org.jpos.iso.packager.PostPackager)3 XMLPackager (org.jpos.iso.packager.XMLPackager)3 Element (org.jdom2.Element)2 BASE24TCPChannel (org.jpos.iso.channel.BASE24TCPChannel)2 LogChannel (org.jpos.iso.channel.LogChannel)2 PADChannel (org.jpos.iso.channel.PADChannel)2