use of com.adaptris.core.jms.jndi.BaseJndiImplementation in project interlok by adaptris.
the class JndiImplementationCase method testSetNewContextOnException.
@Test
public void testSetNewContextOnException() throws Exception {
BaseJndiImplementation jv = createVendorImplementation();
assertNull(jv.getNewContextOnException());
assertFalse(jv.newContextOnException());
jv.setNewContextOnException(Boolean.TRUE);
assertEquals(Boolean.TRUE, jv.getNewContextOnException());
assertTrue(jv.newContextOnException());
jv.setNewContextOnException(null);
assertNull(jv.getNewContextOnException());
assertFalse(jv.newContextOnException());
}
use of com.adaptris.core.jms.jndi.BaseJndiImplementation in project interlok by adaptris.
the class JndiImplementationCase method testSetJndiName.
@Test
public void testSetJndiName() throws Exception {
BaseJndiImplementation jv = createVendorImplementation();
jv.setJndiName("ABCDE");
assertEquals("ABCDE", jv.getJndiName());
try {
jv.setJndiName("");
fail();
} catch (IllegalArgumentException expected) {
}
assertEquals("ABCDE", jv.getJndiName());
try {
jv.setJndiName(null);
fail();
} catch (IllegalArgumentException expected) {
}
assertEquals("ABCDE", jv.getJndiName());
}
use of com.adaptris.core.jms.jndi.BaseJndiImplementation in project interlok by adaptris.
the class JndiImplementationCase method testSetEnableEncodedPasswords.
@Test
public void testSetEnableEncodedPasswords() throws Exception {
BaseJndiImplementation vendorImp = createVendorImplementation();
assertNull(vendorImp.getEnableEncodedPasswords());
assertFalse(vendorImp.enableEncodedPasswords());
vendorImp.setEnableEncodedPasswords(Boolean.TRUE);
assertNotNull(vendorImp.getEnableEncodedPasswords());
assertTrue(vendorImp.enableEncodedPasswords());
vendorImp.setEnableEncodedPasswords(null);
assertNull(vendorImp.getEnableEncodedPasswords());
assertFalse(vendorImp.enableEncodedPasswords());
}
use of com.adaptris.core.jms.jndi.BaseJndiImplementation in project interlok by adaptris.
the class JndiImplementationCase method testSetExtraConfiguration.
@Test
public void testSetExtraConfiguration() throws Exception {
BaseJndiImplementation jv = createVendorImplementation();
assertEquals(NoOpFactoryConfiguration.class, jv.getExtraFactoryConfiguration().getClass());
jv.setExtraFactoryConfiguration(new SimpleFactoryConfiguration());
assertEquals(SimpleFactoryConfiguration.class, jv.getExtraFactoryConfiguration().getClass());
try {
jv.setExtraFactoryConfiguration(null);
fail();
} catch (IllegalArgumentException expected) {
}
assertEquals(SimpleFactoryConfiguration.class, jv.getExtraFactoryConfiguration().getClass());
}
use of com.adaptris.core.jms.jndi.BaseJndiImplementation in project interlok by adaptris.
the class JndiImplementationCase method testSetEnableJndiForQueues.
@Test
public void testSetEnableJndiForQueues() throws Exception {
BaseJndiImplementation vendorImp = createVendorImplementation();
assertNull(vendorImp.getUseJndiForQueues());
assertFalse(vendorImp.useJndiForQueues());
vendorImp.setUseJndiForQueues(Boolean.TRUE);
assertNotNull(vendorImp.getUseJndiForQueues());
assertTrue(vendorImp.useJndiForQueues());
vendorImp.setUseJndiForQueues(null);
assertNull(vendorImp.getUseJndiForQueues());
assertFalse(vendorImp.useJndiForQueues());
}
Aggregations