use of org.jpos.core.SubConfiguration in project jPOS by jpos.
the class TransactionManagerTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
Configuration cfg = new SubConfiguration();
try {
transactionManager.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertFalse("transactionManager.debug", transactionManager.debug);
assertSame("transactionManager.getConfiguration()", cfg, transactionManager.getConfiguration());
assertEquals("transactionManager.pauseTimeout", 0L, transactionManager.pauseTimeout);
assertEquals("transactionManager.retryInterval", 5000L, transactionManager.retryInterval);
}
}
use of org.jpos.core.SubConfiguration in project jPOS by jpos.
the class DailyLogListenerTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
DailyLogListener dailyLogListener = new DailyLogListener();
Configuration cfg = new SubConfiguration();
try {
dailyLogListener.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertNull("dailyLogListener.rotate", dailyLogListener.rotate);
assertEquals("dailyLogListener.getCompressionBufferSize()", 131072, dailyLogListener.getCompressionBufferSize());
assertNotNull("dailyLogListener.p", dailyLogListener.p);
assertNull("dailyLogListener.getPrefix()", dailyLogListener.getPrefix());
assertEquals("dailyLogListener.getSuffix()", ".log", dailyLogListener.getSuffix());
assertNull("dailyLogListener.f", dailyLogListener.f);
assertEquals("dailyLogListener.getCompressedSuffix()", "", dailyLogListener.getCompressedSuffix());
assertNull("dailyLogListener.logName", dailyLogListener.logName);
assertEquals("dailyLogListener.sleepTime", 0L, dailyLogListener.sleepTime);
assertEquals("dailyLogListener.maxSize", 0L, dailyLogListener.maxSize);
assertEquals("dailyLogListener.getCompressionFormat()", 0, dailyLogListener.getCompressionFormat());
assertTrue("dailyLogListener.getDateFmt().isLenient()", dailyLogListener.getDateFmt().isLenient());
}
}
use of org.jpos.core.SubConfiguration in project jPOS by jpos.
the class DirPollTest method testSetConfigurationThrowsNullPointerException1.
@Test
public void testSetConfigurationThrowsNullPointerException1() throws Throwable {
Configuration cfg = new SubConfiguration();
DirPoll processor = new DirPoll();
DirPoll dirPoll = new DirPoll();
processor.setProcessor("");
dirPoll.setProcessor(processor);
try {
dirPoll.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.core.SubConfiguration in project jPOS by jpos.
the class DirPollTest method testSetConfigurationThrowsStackOverflowError.
@Test
public void testSetConfigurationThrowsStackOverflowError() throws Throwable {
Configuration cfg = new SubConfiguration();
DirPoll processor = new DirPoll();
processor.setProcessor(processor);
try {
processor.setConfiguration(cfg);
fail("Expected StackOverflowError to be thrown");
} catch (StackOverflowError ex) {
assertEquals("ex.getClass()", StackOverflowError.class, ex.getClass());
}
}
use of org.jpos.core.SubConfiguration in project jPOS by jpos.
the class DirPollTest method testSetConfigurationThrowsNullPointerException4.
@Test
public void testSetConfigurationThrowsNullPointerException4() throws Throwable {
Configuration cfg = new SubConfiguration();
DirPoll dirPoll = new DirPoll();
try {
dirPoll.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
Aggregations