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

Vive Pandey (JIRA) jira-events at lists.jboss.org
Mon Nov 16 20:02:42 EST 2009


Issues in testGetStereotypesCalled and testIsNullableCalled
-----------------------------------------------------------

                 Key: CDITCK-57
                 URL: https://jira.jboss.org/jira/browse/CDITCK-57
             Project: CDI TCK
          Issue Type: CTS Challenge
      Security Level: Public (Everyone can see)
          Components: Tests
    Affects Versions: 1.0.1.CR1
            Reporter: Vive Pandey


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