@Test public void testLogAddStrict() throws Exception { logCommand.execute(DefaultSoarCommandContext.empty(), new String[]{"log", "--strict", "enable"}); assertTrue(logManager.isStrict()); Set<String> testSet = new HashSet<String>(); testSet.add("default"); assertTrue(logManager.getLoggerNames().equals(testSet)); logCommand.execute(DefaultSoarCommandContext.empty(), new String[]{"log", "--add", "test-logger"}); testSet.add("test-logger"); assertTrue(logManager.getLoggerNames().equals(testSet)); boolean success = false; try { logCommand.execute(DefaultSoarCommandContext.empty(), new String[]{"log", "test-logger2", "error", "test-string"}); } catch (SoarException e) { success = true; } finally { assertTrue(success); } logCommand.execute(DefaultSoarCommandContext.empty(), new String[]{"log", "--add", "test-logger2"}); testSet.add("test-logger2"); assertTrue(logManager.getLoggerNames().equals(testSet)); success = true; try { logCommand.execute(DefaultSoarCommandContext.empty(), new String[]{"log", "test-logger2", "error", "test-string"}); } catch (SoarException e) { success = false; } finally { assertTrue(success); } success = false; try { logCommand.execute(DefaultSoarCommandContext.empty(), new String[]{"log", "--add", "test-logger"}); } catch (SoarException e) { success = true; } finally { assertTrue(success); } }
@Override public String execute(SoarCommandContext context, String[] args) throws SoarException { final Log log = ((Log)this.picocliCommand); log.context = context; return super.execute(context, args); }
LogCommand extends PicocliSoarCommand { @Override public String execute(SoarCommandContext context, String[] args) throws SoarException { final Log log = ((Log)this.picocliCommand); log.context = context; return super.execute(context, args); } }
LogCommand extends PicocliSoarCommand { @Override public String execute(SoarCommandContext context, String[] args) throws SoarException { final Log log = ((Log)this.picocliCommand); log.context = context; return super.execute(context, args); } LogCommand(Agent agent, SoarCommandInterpreter interpreter); }
LogCommand extends PicocliSoarCommand { @Override public String execute(SoarCommandContext context, String[] args) throws SoarException { final Log log = ((Log)this.picocliCommand); log.context = context; return super.execute(context, args); } LogCommand(Agent agent, SoarCommandInterpreter interpreter); @Override String execute(SoarCommandContext context, String[] args); }
LogCommand extends PicocliSoarCommand { @Override public String execute(SoarCommandContext context, String[] args) throws SoarException { final Log log = ((Log)this.picocliCommand); log.context = context; return super.execute(context, args); } LogCommand(Agent agent, SoarCommandInterpreter interpreter); @Override String execute(SoarCommandContext context, String[] args);  }