org.jboss.webbeans.tck.unit.implementation.producer.field
Class ProducerFieldLifecycleTest
java.lang.Object
org.jboss.webbeans.tck.AbstractTest
org.jboss.webbeans.tck.unit.implementation.producer.field.ProducerFieldLifecycleTest
public class ProducerFieldLifecycleTest
- extends AbstractTest
Spec version: PRD2
|
Method Summary |
protected java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getEnabledDeploymentTypes()
This method should be overridden by test classes which need to enable
additional deployment types beyond the normal ones. |
void |
testProducerFieldBeanCreate()
When the create() method of a Bean object that represents a producer field
is called, the container must access the producer field to obtain the
current value of the field. |
void |
testProducerFieldReturnsNullIsDependent()
If the producer field contains a null value and the producer field bean
has the scope @Dependent, the create() method re- turns a null value. |
void |
testProducerFieldReturnsNullIsNotDependent()
Otherwise, if the producer field contains a null value, and the scope of
the producer method is not @Dependent, the create() method throws an
IllegalProductException. |
void |
testProducerStaticFieldBean()
When the create() method of a Bean object that represents a producer field
is called, the container must access the producer field to obtain the
current value of the field. |
void |
testSpecializedBeanAlwaysUsed()
|
| Methods inherited from class org.jboss.webbeans.tck.AbstractTest |
activateDependentContext, after, before, createEnterpriseBean, createProducerFieldBean, createProducerMethodBean, createSimpleBean, deactivateDependentContext, deployBeans, deserialize, getStandardDeploymentTypes, mockCreationalContext, serialize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProducerFieldLifecycleTest
public ProducerFieldLifecycleTest()
getEnabledDeploymentTypes
protected java.util.List<java.lang.Class<? extends java.lang.annotation.Annotation>> getEnabledDeploymentTypes()
- Description copied from class:
AbstractTest
- This method should be overridden by test classes which need to enable
additional deployment types beyond the normal ones.
- Overrides:
getEnabledDeploymentTypes in class AbstractTest
- Returns:
- the list of enabled deployment types
testProducerStaticFieldBean
@SpecAssertion(section="5.6")
public void testProducerStaticFieldBean()
- When the create() method of a Bean object that represents a producer field
is called, the container must access the producer field to obtain the
current value of the field.
• If the producer method is static, the container must access the field
value.
testProducerFieldBeanCreate
@SpecAssertion(section="6.8")
public void testProducerFieldBeanCreate()
throws java.lang.Exception
- When the create() method of a Bean object that represents a producer field
is called, the container must access the producer field to obtain the
current value of the field.
• Otherwise, if the producer method is non-static, the container must:
• obtain the Bean object for the most specialized bean that specializes
the bean which declares the producer field, and then
• obtain an instance of the most specialized bean, by calling
Manager.getInstance(), passing the Bean object rep- resenting the bean,
and
• access the field value of this instance.
The value of the producer field is the new contextual instance to be
returned by Bean.create().
- Throws:
java.lang.Exception
testSpecializedBeanAlwaysUsed
@SpecAssertion(section="6.8")
public void testSpecializedBeanAlwaysUsed()
throws java.lang.Exception
- Throws:
java.lang.Exception
testProducerFieldReturnsNullIsDependent
@SpecAssertion(section={"3.5","6.8","8.3"})
public void testProducerFieldReturnsNullIsDependent()
throws java.lang.Exception
- If the producer field contains a null value and the producer field bean
has the scope @Dependent, the create() method re- turns a null value.
- Throws:
java.lang.Exception
testProducerFieldReturnsNullIsNotDependent
@SpecAssertion(section={"3.5","6.8"})
public void testProducerFieldReturnsNullIsNotDependent()
throws java.lang.Exception
- Otherwise, if the producer field contains a null value, and the scope of
the producer method is not @Dependent, the create() method throws an
IllegalProductException.
- Throws:
java.lang.Exception
Copyright © 2008-2009. All Rights Reserved.