@Test public void testAddScriptInfoThrowsNullPointerException() throws Throwable { BSHLogListener bSHLogListener = new BSHLogListener(); try { bSHLogListener.addScriptInfo(null, "testBSHLogListenerCode", 100L); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { assertEquals("The script file name cannot be null", ex.getMessage()); assertEquals(0, bSHLogListener.scripts.size()); } }
protected void addScriptInfo(String filename, String code, long lastModified){ Objects.requireNonNull(filename, "The script file name cannot be null"); scripts.put(filename, new ScriptInfo(code, lastModified)); }
BSHLogListener implements org.jpos.util.LogListener, org.jpos.core.Configurable { protected void addScriptInfo(String filename, String code, long lastModified){ Objects.requireNonNull(filename, "The script file name cannot be null"); scripts.put(filename, new ScriptInfo(code, lastModified)); } }
BSHLogListener implements org.jpos.util.LogListener, org.jpos.core.Configurable { protected void addScriptInfo(String filename, String code, long lastModified){ Objects.requireNonNull(filename, "The script file name cannot be null"); scripts.put(filename, new ScriptInfo(code, lastModified)); } BSHLogListener(); }
BSHLogListener implements org.jpos.util.LogListener, org.jpos.core.Configurable { protected void addScriptInfo(String filename, String code, long lastModified){ Objects.requireNonNull(filename, "The script file name cannot be null"); scripts.put(filename, new ScriptInfo(code, lastModified)); } BSHLogListener(); @Override void setConfiguration(org.jpos.core.Configuration cfg); @Override LogEvent log(LogEvent ev); }
BSHLogListener implements org.jpos.util.LogListener, org.jpos.core.Configurable { protected void addScriptInfo(String filename, String code, long lastModified){ Objects.requireNonNull(filename, "The script file name cannot be null"); scripts.put(filename, new ScriptInfo(code, lastModified)); } BSHLogListener(); @Override void setConfiguration(org.jpos.core.Configuration cfg); @Override LogEvent log(LogEvent ev);  }