@Test public void testGetPendingCommands() throws Exception { final InputOutput io = agent.getInputOutput(); new CycleCountInput(io); sourceTestFile("testGetPendingCommands.soar"); final MatcherBuilder m = Wmes.matcher(agent); agent.runFor(1, RunType.DECISIONS); assertEquals(1, io.getPendingCommands().size()); assertEquals(1, Iterators.size(io.getOutputLink().getWmes())); assertNotNull(m.id(io.getOutputLink()).attr("first").find(io.getPendingCommands())); agent.runFor(1, RunType.DECISIONS); assertEquals(1, io.getPendingCommands().size()); assertEquals(2, Iterators.size(io.getOutputLink().getWmes())); assertNotNull(m.id(io.getOutputLink()).attr("second").find(io.getPendingCommands())); agent.runFor(1, RunType.DECISIONS); assertEquals(1, io.getPendingCommands().size()); assertEquals(3, Iterators.size(io.getOutputLink().getWmes())); assertNotNull(m.id(io.getOutputLink()).attr("third").find(io.getPendingCommands())); agent.runFor(1, RunType.DECISIONS); assertEquals(0, io.getPendingCommands().size()); assertEquals(3, Iterators.size(io.getOutputLink().getWmes())); }
@Override public List<Wme> getPendingCommands() { return new ArrayList<Wme>(pendingCommands); }
InputOutputImpl implements InputOutput, WmeFactory<InputWme> { @Override public List<Wme> getPendingCommands() { return new ArrayList<Wme>(pendingCommands); } }
InputOutputImpl implements InputOutput, WmeFactory<InputWme> { @Override public List<Wme> getPendingCommands() { return new ArrayList<Wme>(pendingCommands); } InputOutputImpl(Agent context); }
InputOutputImpl implements InputOutput, WmeFactory<InputWme> { @Override public List<Wme> getPendingCommands() { return new ArrayList<Wme>(pendingCommands); } InputOutputImpl(Agent context); void initialize(); @Override WmeFactory<InputWme> asWmeFactory(); @Override InputWme addWme(Identifier id, Symbol attr, Symbol value); @Override SymbolFactory getSymbols(); @Override SoarEventManager getEvents(); void init_agent_memory(); @Override Identifier getInputLink(); @Override Identifier getOutputLink(); @Override InputWme addInputWme(Identifier id, Symbol attr, Symbol value); WmeImpl addInputWmeInternal(Identifier id, Symbol attr, Symbol value); void removeInputWmeInternal(WmeImpl w); @Override List<Wme> getPendingCommands(); @Override List<Wme> getRemovingCommands(); @Override void asynchronousInputReady(); void do_input_cycle(); void inform_output_module_of_wm_changes(ListHead<WmeImpl> wmes_being_added, ListHead<WmeImpl> wmes_being_removed); void do_output_cycle(); boolean isOutputLinkChanged(); }
InputOutputImpl implements InputOutput, WmeFactory<InputWme> { @Override public List<Wme> getPendingCommands() { return new ArrayList<Wme>(pendingCommands); } InputOutputImpl(Agent context); void initialize(); @Override WmeFactory<InputWme> asWmeFactory(); @Override InputWme addWme(Identifier id, Symbol attr, Symbol value); @Override SymbolFactory getSymbols(); @Override SoarEventManager getEvents(); void init_agent_memory(); @Override Identifier getInputLink(); @Override Identifier getOutputLink(); @Override InputWme addInputWme(Identifier id, Symbol attr, Symbol value); WmeImpl addInputWmeInternal(Identifier id, Symbol attr, Symbol value); void removeInputWmeInternal(WmeImpl w); @Override List<Wme> getPendingCommands(); @Override List<Wme> getRemovingCommands(); @Override void asynchronousInputReady(); void do_input_cycle(); void inform_output_module_of_wm_changes(ListHead<WmeImpl> wmes_being_added, ListHead<WmeImpl> wmes_being_removed); void do_output_cycle(); boolean isOutputLinkChanged();  }