[weld-issues] [JBoss JIRA] Updated: (CDITCK-57) Issues in testGetStereotypesCalled and testIsNullableCalled

Pete Muir (JIRA) jira-events at lists.jboss.org
Tue Dec 15 09:20:32 EST 2009


     [ https://jira.jboss.org/jira/browse/CDITCK-57?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir updated CDITCK-57:
----------------------------

    Fix Version/s: 1.1.0.CR1


> Issues in testGetStereotypesCalled and testIsNullableCalled
> -----------------------------------------------------------
>
>                 Key: CDITCK-57
>                 URL: https://jira.jboss.org/jira/browse/CDITCK-57
>             Project: CDI TCK
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Tests
>    Affects Versions: 1.0.0.GA
>         Environment: JDK 6 u15, Snow Leopard, GlassFish v3 b72, CDI TCK 1.0.1 RC1
>            Reporter: Vivek Pandey
>             Fix For: 1.0.1.CR1, 1.1.0.CR1
>
>
> The following tests in CDI TCK 1.0.1 RC1 are failing on GlassFish v3. the tests seem to be invalid. See below:
> *.definition.bean.custom.CustomBeanImplementationTest.testGetStereotypesCalled
> *.definition.bean.custom.CustomBeanImplementationTest.testIsNullableCalled
> the first one testGetStereotypesCalled is supposed to be set during called to Bean.getStereotypes(), and its never called. Same applies for testIsNullableCalled, which is supposed to return true when Bean.isNullable() is called, but is never called.
> jsr 299 spec in 5.1.1 lays out this requirement for custom beans:
> For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls isAlternative() to determine whether the bean is an alternative, and getBeanClass() and getStereotypes() to determ- ine whether an alternative is selected in a certain bean archive.
> In this test case, isAlternative() returns false, and correctly so because the associated beans.xml does not define any alternative beans or there is no @Alternative in the bean. This is defined in sec 5.1.1 and 11.1.
> According to Bean.isNullable() returns true only if the Bean.create(), here CatBean.create() sometimes return null. In this case it never
> public Cat create(CreationalContext<Cat> creationalContext){
>       return new Cat("kitty");
>    }
> So in my investigation both these assertions  testGetStereotypesCalled() and testIsNullableCalled() are invalid.

-- 
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