[weld-issues] [JBoss JIRA] Updated: (CDITCK-89) TCK on Policy Tests
Pete Muir (JIRA)
jira-events at lists.jboss.org
Mon Jan 18 17:27:47 EST 2010
[ https://jira.jboss.org/jira/browse/CDITCK-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pete Muir updated CDITCK-89:
----------------------------
Fix Version/s: 1.0.1.CR1
1.1.0.CR1
> TCK on Policy Tests
> -------------------
>
> Key: CDITCK-89
> URL: https://jira.jboss.org/jira/browse/CDITCK-89
> Project: CDI TCK
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Gurkan Erdogdu
> Fix For: 1.0.1.CR1, 1.1.0.CR1
>
>
> Hi;
> I am currently testing org.jboss.jsr299.tck.tests.policy.PolicyAvailabilityTest. My questions are on the following test methods
> - testProducerPoliciesOnClass
> Sheep is produced by "EnabledSheepProducer" class that is defined in beans.xml and "NotEnabledSheepProducer" class that is not defined in beans.xml. So the first assertion in the test is correct
> 1) assert getBeans(Sheep.class, new AnnotationLiteral<Wild>(){}).size() == 2;
> But how the second assertion is correct?
> 2) assert getBeans(Sheep.class, new AnnotationLiteral<Tame>(){}).size() == 2;
> NotEnabledSheepProducer is not defined in beans.xml. So producer field and method that is contained in this class are disabled.
> - testProducerPoliciesOnMethodAndField
> CatProducer class defines producer field and method that are annotated with @Alternative. According to the spec section 5.1.1 "the alternative is a producer method, field or resource, and the bean class that declares the method or field is listed in beans.xml". CatProducer class is not defined in beans.xml so those producer beans must be disabled and must not be used in resolutions.
> So the following assertions must be false, because CatProducer class is not defined in beans.xml
> assert getBeans(Cat.class, new AnnotationLiteral<Wild>(){}).size() == 2;
> assert getBeans(Cat.class, new AnnotationLiteral<Tame>(){}).size() == 2;
--
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