<div dir="ltr">Well, you are the boss, I&#39;m just an API user... but would like my life to be simplified ;o) Of course I can iterate through a map in each of the tests, but if there was already a method, that would help. Because, in Roaster, we find this pattern all over the place : getMethods(), getMethod(String s), hasMethod(Method m), getAnnotations(), getAnnotation(String s), hasAnnotation(Annotation a).... I find this handy, and manipulating the CommandController often... well, it helps ;o)<div><br></div><div>Antonio</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-19 11:13 GMT+01:00 George Gastaldi <span dir="ltr">&lt;<a href="mailto:ggastald@redhat.com" target="_blank">ggastald@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hi Antonio,</div><div><br></div><div>How different is that from the immutable Map? I find the Map more flexible in terms of:</div><div><br></div><div>- you can do inputs.keySet() and iterate through the input names (there are some places where we do this)</div><div>- some UIProviders need to know if a Command has any input at all to decide if it should execute or should render the Wizard screen.</div><div><br></div><div>So I am not sure if this is a good idea, but I may be wrong ;)</div><div><br></div><div>Best Regards,</div><div><br></div><div>George Gastaldi<br><br><br></div><div><br>Em 19/02/2015, às 07:24, Antonio Goncalves &lt;<a href="mailto:antonio.mailing@gmail.com" target="_blank">antonio.mailing@gmail.com</a>&gt; escreveu:<br><br></div><div><div class="h5"><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra">Hi all,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I&#39;m investigating how to refactor UICommands in the best way (see the analysis in <a href="https://issues.jboss.org/browse/FORGE-2109" target="_blank">https://issues.jboss.org/browse/FORGE-2109</a>). But before refactoring, I would like to add a stronger test coverage so I make sure I don&#39;t break things. </div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I was looking at CommandController that list of the command inputs : </div><div class="gmail_extra"><br></div><div class="gmail_extra"><font face="monospace, monospace">Map&lt;String, InputComponent&lt;?, ?&gt;&gt; <b>getInputs</b>();</font></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I would like to add the following commands </div><div class="gmail_extra"><br></div><div class="gmail_extra"><font face="monospace, monospace">InputComponent&lt;?, ?&gt; <b>getInput</b>(String input); // returns one input</font></div><div class="gmail_extra"><font face="monospace, monospace">boolean <b>hasInput</b>(String input); // checks if the input is present</font><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">What do you think ?</div><div class="gmail_extra"><div><br></div>-- <br><div>Antonio Goncalves <br>Software architect and Java Champion<br><br><a href="http://www.antoniogoncalves.org/" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a> | <a href="http://www.linkedin.com/in/agoncal" target="_blank">LinkedIn</a> | <a href="http://www.parisjug.org/" target="_blank">Paris JUG</a> | <a href="http://www.devoxx.fr/" target="_blank">Devoxx France</a></div>
</div></div>
</div></blockquote></div></div><blockquote type="cite"><div><span>_______________________________________________</span><span class=""><br><span>forge-dev mailing list</span><br><span><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a></span></span></div></blockquote></div><br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Antonio Goncalves <br>Software architect and Java Champion<br><br><a href="http://www.antoniogoncalves.org/" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a> | <a href="http://www.linkedin.com/in/agoncal" target="_blank">LinkedIn</a> | <a href="http://www.parisjug.org/" target="_blank">Paris JUG</a> | <a href="http://www.devoxx.fr/" target="_blank">Devoxx France</a></div>
</div>