@Disabled("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( "org.jpos.iso.ISOException: java.lang.ClassNotFoundException: org.apache.crimson.parser.XMLReaderImpl (java.lang.ClassNotFoundException: org.apache.crimson.parser.XMLReaderImpl)", ex.getMessage(), "ex.getMessage()"); assertEquals("java.lang.ClassNotFoundException: org.apache.crimson.parser.XMLReaderImpl", ex.getNested().getMessage(), "ex.getNested().getMessage()"); assertEquals("", genericPackager.getLogger().getName(), "(GenericValidatingPackager) genericValidatingPackager.getLogger().getName()"); assertEquals("", genericPackager.getRealm(), "(GenericValidatingPackager) genericValidatingPackager.getRealm()"); } }
public void setConfiguration (Configuration cfg) throws ConfigurationException { filename = cfg.get("packager-config", null); if (filename == null) throw new ConfigurationException("packager-config property cannot be null"); try { String loggerName = cfg.get("packager-logger"); if (loggerName != null) setLogger(Logger.getLogger (loggerName), cfg.get ("packager-realm")); logFieldName= cfg.getBoolean("packager-log-fieldname", logFieldName); readFile(filename); } catch (ISOException e) { throw new ConfigurationException(e.getMessage(), e.fillInStackTrace()); } }
GenericPackager extends ISOBasePackager implements Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { filename = cfg.get("packager-config", null); if (filename == null) throw new ConfigurationException("packager-config property cannot be null"); try { String loggerName = cfg.get("packager-logger"); if (loggerName != null) setLogger(Logger.getLogger (loggerName), cfg.get ("packager-realm")); logFieldName= cfg.getBoolean("packager-log-fieldname", logFieldName); readFile(filename); } catch (ISOException e) { throw new ConfigurationException(e.getMessage(), e.fillInStackTrace()); } } }
GenericPackager extends ISOBasePackager implements Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { filename = cfg.get("packager-config", null); if (filename == null) throw new ConfigurationException("packager-config property cannot be null"); try { String loggerName = cfg.get("packager-logger"); if (loggerName != null) setLogger(Logger.getLogger (loggerName), cfg.get ("packager-realm")); logFieldName= cfg.getBoolean("packager-log-fieldname", logFieldName); readFile(filename); } catch (ISOException e) { throw new ConfigurationException(e.getMessage(), e.fillInStackTrace()); } } GenericPackager();  GenericPackager(String filename);  GenericPackager(InputStream input); }
GenericPackager extends ISOBasePackager implements Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { filename = cfg.get("packager-config", null); if (filename == null) throw new ConfigurationException("packager-config property cannot be null"); try { String loggerName = cfg.get("packager-logger"); if (loggerName != null) setLogger(Logger.getLogger (loggerName), cfg.get ("packager-realm")); logFieldName= cfg.getBoolean("packager-log-fieldname", logFieldName); readFile(filename); } catch (ISOException e) { throw new ConfigurationException(e.getMessage(), e.fillInStackTrace()); } } GenericPackager();  GenericPackager(String filename);  GenericPackager(InputStream input); void setConfiguration(Configuration cfg); void readFile(String filename); void readFile(InputStream input); @Override void setLogger(Logger logger, String realm); @Override String getDescription(); }
GenericPackager extends ISOBasePackager implements Configurable { public void setConfiguration (Configuration cfg) throws ConfigurationException { filename = cfg.get("packager-config", null); if (filename == null) throw new ConfigurationException("packager-config property cannot be null"); try { String loggerName = cfg.get("packager-logger"); if (loggerName != null) setLogger(Logger.getLogger (loggerName), cfg.get ("packager-realm")); logFieldName= cfg.getBoolean("packager-log-fieldname", logFieldName); readFile(filename); } catch (ISOException e) { throw new ConfigurationException(e.getMessage(), e.fillInStackTrace()); } } GenericPackager();  GenericPackager(String filename);  GenericPackager(InputStream input); void setConfiguration(Configuration cfg); void readFile(String filename); void readFile(InputStream input); @Override void setLogger(Logger logger, String realm); @Override String getDescription();  }