@Test public void testRun() throws ArgumentParserException { act.run(null, arg, attrs, "-f", null); assertEquals(1, attrs.get(arg.getDest())); act.run(null, arg, attrs, "-f", null); assertEquals(2, attrs.get(arg.getDest())); }
@Override public void run(ArgumentParser parser, Argument arg, Map<String, Object> attrs, String flag, Object value) throws ArgumentParserException { String dest = arg.getDest(); int n = (Integer) attrs.get(dest); attrs.put(dest, n + 1); }
CountArgumentAction implements ArgumentAction { @Override public void run(ArgumentParser parser, Argument arg, Map<String, Object> attrs, String flag, Object value) throws ArgumentParserException { String dest = arg.getDest(); int n = (Integer) attrs.get(dest); attrs.put(dest, n + 1); } }
CountArgumentAction implements ArgumentAction { @Override public void run(ArgumentParser parser, Argument arg, Map<String, Object> attrs, String flag, Object value) throws ArgumentParserException { String dest = arg.getDest(); int n = (Integer) attrs.get(dest); attrs.put(dest, n + 1); }  }
CountArgumentAction implements ArgumentAction { @Override public void run(ArgumentParser parser, Argument arg, Map<String, Object> attrs, String flag, Object value) throws ArgumentParserException { String dest = arg.getDest(); int n = (Integer) attrs.get(dest); attrs.put(dest, n + 1); }  @Override void run(ArgumentParser parser, Argument arg,
            Map<String, Object> attrs, String flag, Object value); @Override void onAttach(Argument arg); @Override boolean consumeArgument(); }
CountArgumentAction implements ArgumentAction { @Override public void run(ArgumentParser parser, Argument arg, Map<String, Object> attrs, String flag, Object value) throws ArgumentParserException { String dest = arg.getDest(); int n = (Integer) attrs.get(dest); attrs.put(dest, n + 1); }  @Override void run(ArgumentParser parser, Argument arg,
            Map<String, Object> attrs, String flag, Object value); @Override void onAttach(Argument arg); @Override boolean consumeArgument();  }