Fedora

On Feb 16, 2016 12:27, "George Gastaldi" <ggastald@redhat.com> wrote:

That looks weird, what OS are you using?

Em 16/02/2016 04:13, "Ivan St. Ivanov" <ivan.st.ivanov@gmail.com> escreveu:
Gotcha!

So after instead of:
chosenFacet.install();
I did:
facetFactory.install(getSelectedProject(uiExecutionContext), chosenFacet);
Everything worked like a charm!

Thanks, George, for the quick reaction! :)

On a side note, what is wrong with the addon configuration, so that if I need to test any change I do in the impl module, I have to mvn clean install and only then run the test from tests module?



On Tue, Feb 16, 2016 at 12:37 AM, George Gastaldi <ggastald@redhat.com> wrote:

Hi Ivan,

The faceted object assigned in the facet instance will only be set when you install a facet (using the FacetFactory).

The facet values in the UISelectOne can only be used after they are installed in a given project.

Therefore, as a rule of thumb, don't expect the faceted object to be set on the Facet objects returned from UISelectOne.getValueChoices unless they are explicitly installed in the faceted project (eg FacetFactory.install() is called).

Best Regards,

George Gastaldi

Em 15/02/2016 20:02, "Ivan St. Ivanov" <ivan.st.ivanov@gmail.com> escreveu:
Hey everybody,

I am trying to add a test for the TestingSetupCommand, part of the testing addon, that I want to develop. What is particular about this command and the addon:

- They use the simple furnace container instead of cdi
- The command has UISelectOne input which values are supposed to be implementations of the TestingFacet interface (JUnitTestingFacet and TestNGTestingFacet)

The testing facet base class that is extended by both facet implementations has a method that returns the dependency facet of the currently selected project:
private DependencyFacet getDependencyFacet()
{
return getFaceted().getFacet(DependencyFacet.class);
}
And this method works fine when it is called when the test sets up the test project. However, when I "select" a testing framework form the UISelectOne, the value that I get back (in my case TestNGTestingFacet) does not have a valid origin field (it's null). Is it possible that upon setup the UISelectOne's items are not initialized properly?

You can check the code in my repository:


Just put a breakpoint in AbstractTestingFacet::getDependencyFacet and run TestSetupCommandTest::testSetupTestNG. Check the content of the getFaceted() return value.

Thanks,
Ivan

 

_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev

_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev


_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev

_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev