[forge-dev] Facet origin missing for UISelectOne labels

Ivan St. Ivanov ivan.st.ivanov at gmail.com
Mon Feb 15 17:02:37 EST 2016


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:

https://github.com/ivannov/core/tree/FORGE-2545

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

Thanks,
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20160216/93ff2510/attachment.html 


More information about the forge-dev mailing list