use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class JCESecurityModuleTest method testSetConfigurationThrowsConfigurationException.
@Test
public void testSetConfigurationThrowsConfigurationException() throws Throwable {
JCESecurityModule jCESecurityModule = new JCESecurityModule();
Configuration cfg = new SimpleConfiguration();
try {
jCESecurityModule.setConfiguration(cfg);
fail("Expected ConfigurationException to be thrown");
} catch (ConfigurationException ex) {
// expected
}
}
use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class JCESecurityModuleTest method testConstructorThrowsConfigurationException1.
@Test
public void testConstructorThrowsConfigurationException1() throws Throwable {
Configuration cfg = new SimpleConfiguration();
try {
new JCESecurityModule(cfg, new Logger(), "testJCESecurityModuleRealm");
fail("Expected ConfigurationException to be thrown");
} catch (ConfigurationException ex) {
// expected
}
}
use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class JCESecurityModuleTest method testConstructorThrowsConfigurationException.
@Test
public void testConstructorThrowsConfigurationException() throws Throwable {
try {
new JCESecurityModule(new SimpleConfiguration(), Logger.getLogger("."), "testJCESecurityModuleRealm");
fail("Expected ConfigurationException to be thrown");
} catch (ConfigurationException ex) {
assertTrue(true, "Test completed without Exception");
// dependencies on static and environment state led to removal of 4
// assertions
}
}
use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class JCESecurityModuleTest method testSetConfigurationThrowsConfigurationException1.
@Test
public void testSetConfigurationThrowsConfigurationException1() throws Throwable {
JCESecurityModule jCESecurityModule = new JCESecurityModule();
jCESecurityModule.setLogger(Logger.getLogger("."), "testJCESecurityModuleRealm");
try {
jCESecurityModule.setConfiguration(new SimpleConfiguration());
fail("Expected ConfigurationException to be thrown");
} catch (ConfigurationException ex) {
assertTrue(true, "Test completed without Exception");
// dependencies on static and environment state led to removal of 8
// assertions
}
}
use of org.jpos.core.SimpleConfiguration in project jPOS by jpos.
the class DailyTaskAdaptorTest method testWaitUntilStartTimeThrowsNumberFormatException.
@Test
public void testWaitUntilStartTimeThrowsNumberFormatException() throws Throwable {
DailyTaskAdaptor dailyTaskAdaptor = new DailyTaskAdaptor();
Configuration cfg = new SimpleConfiguration();
dailyTaskAdaptor.setConfiguration(cfg);
try {
dailyTaskAdaptor.waitUntilStartTime();
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