Search in sources :

Example 6 with BaseJndiImplementation

use of com.adaptris.core.jms.jndi.BaseJndiImplementation in project interlok by adaptris.

the class JndiImplementationCase method testSetEnableJndiForTopics.

@Test
public void testSetEnableJndiForTopics() throws Exception {
    BaseJndiImplementation vendorImp = createVendorImplementation();
    assertNull(vendorImp.getUseJndiForTopics());
    assertFalse(vendorImp.useJndiForTopics());
    vendorImp.setUseJndiForTopics(Boolean.TRUE);
    assertNotNull(vendorImp.getUseJndiForTopics());
    assertTrue(vendorImp.useJndiForTopics());
    vendorImp.setUseJndiForTopics(null);
    assertNull(vendorImp.getUseJndiForTopics());
    assertFalse(vendorImp.useJndiForTopics());
}
Also used : BaseJndiImplementation(com.adaptris.core.jms.jndi.BaseJndiImplementation) Test(org.junit.Test)

Example 7 with BaseJndiImplementation

use of com.adaptris.core.jms.jndi.BaseJndiImplementation in project interlok by adaptris.

the class JndiImplementationCase method testSetJndiParams.

@Test
public void testSetJndiParams() throws Exception {
    BaseJndiImplementation jv = createVendorImplementation();
    KeyValuePairSet set = new KeyValuePairSet();
    jv.setJndiParams(set);
    assertEquals(set, jv.getJndiParams());
    try {
        jv.setJndiParams(null);
        fail();
    } catch (IllegalArgumentException expected) {
    }
    assertEquals(set, jv.getJndiParams());
}
Also used : BaseJndiImplementation(com.adaptris.core.jms.jndi.BaseJndiImplementation) KeyValuePairSet(com.adaptris.util.KeyValuePairSet) Test(org.junit.Test)

Aggregations

BaseJndiImplementation (com.adaptris.core.jms.jndi.BaseJndiImplementation)7 Test (org.junit.Test)7 SimpleFactoryConfiguration (com.adaptris.core.jms.jndi.SimpleFactoryConfiguration)1 KeyValuePairSet (com.adaptris.util.KeyValuePairSet)1