use of org.jpos.core.Configuration in project jPOS by jpos.
the class JCESecurityModuleTest method testConstructorThrowsNullPointerException2.
@Test
public void testConstructorThrowsNullPointerException2() throws Throwable {
Configuration cfg = new SubConfiguration();
try {
new JCESecurityModule(cfg, new Logger(), "testJCESecurityModuleRealm");
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class JCESecurityModuleTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
JCESecurityModule jCESecurityModule = new JCESecurityModule();
Configuration cfg = new SubConfiguration();
try {
jCESecurityModule.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
}
}
use of org.jpos.core.Configuration 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.Configuration in project jPOS by jpos.
the class DelayFilterTest method testSetConfigurationThrowsNullPointerException.
@Test
public void testSetConfigurationThrowsNullPointerException() throws Throwable {
DelayFilter delayFilter = new DelayFilter(100);
Configuration cfg = new SubConfiguration();
try {
delayFilter.setConfiguration(cfg);
fail("Expected NullPointerException to be thrown");
} catch (NullPointerException ex) {
assertNull("ex.getMessage()", ex.getMessage());
assertEquals("delayFilter.delay", 100, delayFilter.delay);
}
}
use of org.jpos.core.Configuration in project jPOS by jpos.
the class GenericPackagerTest method testSetConfigurationThrowsConfigurationException.
@Ignore("test failing")
@Test
public void testSetConfigurationThrowsConfigurationException() throws Throwable {
GenericPackager genericPackager = new GenericPackager();
Configuration cfg = new SimpleConfiguration();
try {
genericPackager.setConfiguration(cfg);
fail("Expected ConfigurationException to be thrown");
} catch (ConfigurationException ex) {
assertEquals("ex.getMessage()", "org.jpos.iso.ISOException: java.lang.ClassNotFoundException: org.apache.crimson.parser.XMLReaderImpl (java.lang.ClassNotFoundException: org.apache.crimson.parser.XMLReaderImpl)", ex.getMessage());
assertEquals("ex.getNested().getMessage()", "java.lang.ClassNotFoundException: org.apache.crimson.parser.XMLReaderImpl", ex.getNested().getMessage());
assertEquals("(GenericValidatingPackager) genericValidatingPackager.getLogger().getName()", "", genericPackager.getLogger().getName());
assertEquals("(GenericValidatingPackager) genericValidatingPackager.getRealm()", "", genericPackager.getRealm());
}
}
Aggregations