Ah my bad. JavaClassSource::getName returns the class name without the
package. Use getQualifiedName() instead
*George Gastaldi*
On Mon, Jan 30, 2017 at 3:15 PM, Alex Soto Bueno <asotobue(a)redhat.com>
wrote:
I am trying to do it but I have no luck on this. Look the project is
here:
https://github.com/forge/addon-arquillian/pull/16
The test is
https://github.com/forge/addon-arquillian/pull/16/files#diff-
12d88edc779455bcebbb5bd707c56d1cR23
and the logic where it is implemented at
https://github.com/forge/addon-arquillian/pull/16/files#diff-
b7b01b162777c14a55ccc50945b79f51R80
But I don't know why when I run the test I got next exception:
***SUCCESS*** Created test class org.superbiz.MyContractTest
yContractTest
***INFO*** Required inputs not satisfied, entering interactive mode
[0] ( ) MyContractTest
Press <ENTER> to confirm, or <CTRL>+C to cancel.
* Test Class: [0]
STDERR:
BUFFER: []
But if you look at shell command I am setting the parameter so no idea why
this is happening.
On Mon, Jan 30, 2017 at 1:57 PM, George Gastaldi <ggastald(a)redhat.com>
wrote:
> By using a UIInput, you need to specify the converter (setConverter -
from
> string to JavaClassSource) otherwise Forge wouldn't know what to do.
>
> If you were using UISelectOne, it would be a matter of calling
> testClass.setItemLabelConverter(JavaClassSource::getName) since Forge
> would
> query the available valueChoices instead.
>
> Em 30 de jan de 2017 10:22, "Alex Soto Bueno" <asotobue(a)redhat.com>
> escreveu:
>
> Hi mates,
>
> currently I am creating a command that should receive a Test Java Class
as
> parameter.
>
> I have created a command with an attribute of type JavaClassSource.
>
> @Inject
> @WithAttributes(shortName = 'j', label = "Test Class", required
=
true)
> private UIInput<JavaClassSource> testClass;
>
> Then when I try to run this command from CLI the first thing I have noted
> is that autocompletition of the java class name does not work, and when I
> set it manually typing all characters
> i.e arquillian-algeron-create-contract-fragment --consumer consumer
> --provider provider --fragment myFragment --test-class
> org.contract.MyContract then I got No converter found from
java.lang.String
> to org.jboss.forge.roaster.model.source.JavaClassSource
>
> I think that this is because it expects the class to be found as main
java
> classes and not test classes, any idea on why this is happening?
>
> Thank you so much.
> _______________________________________________
> forge-dev mailing list
> forge-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/forge-dev
> _______________________________________________
> forge-dev mailing list
> forge-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/forge-dev
>
_______________________________________________
forge-dev mailing list
forge-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev