[webbeans-issues] [JBoss JIRA] Created: (WBTCK-27) TCK-Event Tests

Gurkan Erdogdu (JIRA) jira-events at lists.jboss.org
Fri Mar 13 19:54:22 EDT 2009


TCK-Event Tests
---------------

                 Key: WBTCK-27
                 URL: https://jira.jboss.org/jira/browse/WBTCK-27
             Project: JSR-299 TCK
          Issue Type: Bug
            Reporter: Gurkan Erdogdu


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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the weld-issues mailing list