use of org.jpos.core.ConfigurationException in project jPOS by jpos.
the class QFactory2Test method testSetConfigurationThrowsConfigurationException.
@Test
public void testSetConfigurationThrowsConfigurationException() throws Throwable {
String[] args = new String[0];
try {
new QFactory(null, new Q2(args)).setConfiguration(new BSHTransactionParticipant(), null);
fail("Expected ConfigurationException to be thrown");
} catch (ConfigurationException ex) {
assertEquals("ex.getMessage()", "org.jpos.core.ConfigurationException (java.lang.NullPointerException)", ex.getMessage());
assertNull("ex.getNested().getMessage()", ex.getNested().getMessage());
}
}
use of org.jpos.core.ConfigurationException 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.ConfigurationException 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.ConfigurationException 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.ConfigurationException 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
}
}
Aggregations