]
Pete Muir updated WBTCK-27:
---------------------------
Summary: Assumption that there won't be >1 bean that resolves to @Fires
Event<?> might be wrong (was: TCK-Event Tests)
Assumption that there won't be >1 bean that resolves to @Fires
Event<?> might be wrong
--------------------------------------------------------------------------------------
Key: WBTCK-27
URL:
https://jira.jboss.org/jira/browse/WBTCK-27
Project: JSR-299 TCK
Issue Type: Bug
Reporter: Gurkan Erdogdu
Fix For: 1.0.0.Beta2
Below test in the Event Test, this fails. Because, there are multiple implicit event
beans are registered with the manager with the same types.
Because some of the test classes have same event firing fields, namely @Fires
Event<String>. So the resolution finds more than one bean throwing
the AmbigiousDependencyException.
@Test(groups = { "events" })
@SpecAssertion(section = "7.6", id = "p")
public void testImplicitEventBeanHasDependentScope() throws Exception
{
new RunInDependentContext()
{
> @Override
> protected void execute() throws Exception
> {
> // Retrieve the implicit event bean from the manager only
> // by its API type (uses BlueFacedParrotFinch)
> Set<?> eventBeans = getCurrentManager().resolveByType(Event.class,
new FiresBinding());
> assert eventBeans.size() == 1;
> Bean<?> eventBean = (Bean<?>) eventBeans.iterator().next();
> assert eventBean.getScopeType().equals(Dependent.class);
> }
> }.run();
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: