use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class ChannelPoolTest method testSetConfiguration.
@Test
public void testSetConfiguration() throws Throwable {
ChannelPool channelPool = new ChannelPool();
Configuration cfg = new SimpleConfiguration();
channelPool.setConfiguration(cfg);
assertSame(cfg, channelPool.cfg, "channelPool.cfg");
}
use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class TransactionManagerTest method testSetConfiguration.
@Test
public void testSetConfiguration() throws Throwable {
Configuration cfg = new SimpleConfiguration();
transactionManager.setConfiguration(cfg);
assertTrue(transactionManager.debug, "transactionManager.debug");
assertSame(cfg, transactionManager.getConfiguration(), "transactionManager.getConfiguration()");
assertEquals(0L, transactionManager.pauseTimeout, "transactionManager.pauseTimeout");
assertEquals(5000L, transactionManager.retryInterval, "transactionManager.retryInterval");
}
use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class QueryHostTest method setUp.
@BeforeEach
public void setUp() throws Exception {
cfg = new SimpleConfiguration();
queryHost = new QueryHost();
queryHost.setConfiguration(cfg);
NameRegistrar.register("mux.TEST", this);
}
use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class DailyTaskAdaptorTest method testRunThrowsNumberFormatException.
@Test
public void testRunThrowsNumberFormatException() throws Throwable {
Configuration cfg = new SimpleConfiguration();
DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor();
dailyTaskAdaptor.setState(2);
dailyTaskAdaptor.setConfiguration(cfg);
try {
dailyTaskAdaptor.run();
fail("Expected NumberFormatException to be thrown");
} catch (NumberFormatException ex) {
assertEquals("For input string: \":0\"", ex.getMessage(), "ex.getMessage()");
assertSame(cfg, dailyTaskAdaptor.getConfiguration(), "dailyTaskAdaptor.getConfiguration()");
}
}
use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class DailyTaskAdaptorTest method testGetWhenThrowsNumberFormatException.
@Test
public void testGetWhenThrowsNumberFormatException() throws Throwable {
Configuration cfg = new SimpleConfiguration();
DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor();
dailyTaskAdaptor.setConfiguration(cfg);
try {
dailyTaskAdaptor.getWhen();
fail("Expected NumberFormatException to be thrown");
} catch (NumberFormatException ex) {
assertEquals("For input string: \":0\"", ex.getMessage(), "ex.getMessage()");
assertSame(cfg, dailyTaskAdaptor.getConfiguration(), "dailyTaskAdaptor.getConfiguration()");
}
}
Aggregations