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 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("Test completed without Exception", true);
// 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 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("Test completed without Exception", true);
// 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 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 VAPChannelTest method testSetConfiguration1.
@Test
public void testSetConfiguration1() throws Throwable {
VAPChannel vAPChannel = new VAPChannel(new Base1SubFieldPackager());
vAPChannel.setConfiguration(new SimpleConfiguration());
assertEquals("vAPChannel.srcid", "000000", vAPChannel.srcid);
assertEquals("vAPChannel.dstid", "000000", vAPChannel.dstid);
assertEquals("vAPChannel.getMaxPacketLength()", 100000, vAPChannel.getMaxPacketLength());
assertEquals("vAPChannel.getPort()", 0, vAPChannel.getPort());
assertNull("vAPChannel.getSocket()", vAPChannel.getSocket());
assertEquals("vAPChannel.getTimeout()", 300000, vAPChannel.getTimeout());
assertFalse("vAPChannel.isOverrideHeader()", vAPChannel.isOverrideHeader());
assertNull("vAPChannel.getHost()", vAPChannel.getHost());
}
Aggregations