org.jboss.cdi.tck.tests.implementation.producer.method.definition
Class ProducerMethodDefinitionTest
java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.jboss.cdi.tck.AbstractTest
org.jboss.cdi.tck.tests.implementation.producer.method.definition.ProducerMethodDefinitionTest
- All Implemented Interfaces:
- org.testng.IHookable, org.testng.ITestNGListener
@SpecVersion(spec="cdi",
version="20091101")
public class ProducerMethodDefinitionTest- extends AbstractTest
| Fields inherited from class org.jboss.arquillian.testng.Arquillian |
ARQUILLIAN_DATA_PROVIDER |
| Methods inherited from class org.jboss.cdi.tck.AbstractTest |
activate, annotationSetMatches, annotationSetMatches, destroyContext, getBeans, getBeans, getContextualReference, getContextualReference, getContextualReference, getCurrentConfiguration, getCurrentManager, getUniqueBean, getUniqueBean, isThrowablePresent, newDependentInstance, passivate, rawTypeSetMatches, setContextActive, setContextInactive, typeSetMatches |
| Methods inherited from class org.jboss.arquillian.testng.Arquillian |
arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProducerMethodDefinitionTest
public ProducerMethodDefinitionTest()
createTestArchive
@Deployment
public static org.jboss.shrinkwrap.api.spec.WebArchive createTestArchive()
testStaticMethod
@SpecAssertions(value={@SpecAssertion(section="producer_method",id="b"),@SpecAssertion(section="producer_or_disposer_methods_invocation",id="a")})
public void testStaticMethod()
throws Exception
- Throws:
Exception
testProducerOnNonBean
@SpecAssertions(value=@SpecAssertion(section="producer_method",id="aa"))
public void testProducerOnNonBean()
throws Exception
- Throws:
Exception
testStaticDisposerMethod
@SpecAssertions(value=@SpecAssertion(section="disposer_method",id="b"))
public void testStaticDisposerMethod()
throws Exception
- Throws:
Exception
testParameterizedReturnType
@SpecAssertion(section="producer_method",
id="ga")
public void testParameterizedReturnType()
throws Exception
- Throws:
Exception
testDefaultBindingType
@SpecAssertions(value={@SpecAssertion(section="producer_method",id="c"),@SpecAssertion(section="declaring_producer_method",id="a"),@SpecAssertion(section="builtin_qualifiers",id="a0"),@SpecAssertion(section="builtin_qualifiers",id="aa")})
public void testDefaultBindingType()
throws Exception
- Throws:
Exception
testApiTypeForClassReturn
@SpecAssertions(value={@SpecAssertion(section="producer_method_types",id="c"),@SpecAssertion(section="bean_types",id="l")})
public void testApiTypeForClassReturn()
throws Exception
- Throws:
Exception
testApiTypeForInterfaceReturn
@SpecAssertion(section="producer_method_types",
id="a")
public void testApiTypeForInterfaceReturn()
throws Exception
- Throws:
Exception
testApiTypeForPrimitiveReturn
@SpecAssertion(section="producer_method_types",
id="ba")
public void testApiTypeForPrimitiveReturn()
throws Exception
- Throws:
Exception
testApiTypeForArrayTypeReturn
@SpecAssertions(value={@SpecAssertion(section="producer_method_types",id="bb"),@SpecAssertion(section="legal_bean_types",id="i")})
public void testApiTypeForArrayTypeReturn()
throws Exception
- Throws:
Exception
testBindingType
@SpecAssertions(value={@SpecAssertion(section="declaring_producer_method",id="be"),@SpecAssertion(section="producer_method",id="k"),@SpecAssertion(section="declaring_bean_qualifiers",id="b")})
public void testBindingType()
throws Exception
- Throws:
Exception
testScopeType
@SpecAssertions(value={@SpecAssertion(section="declaring_producer_method",id="ba"),@SpecAssertion(section="producer_method",id="k")})
public void testScopeType()
throws Exception
- Throws:
Exception
testNamedMethod
@SpecAssertions(value={@SpecAssertion(section="declaring_producer_method",id="bb"),@SpecAssertion(section="declaring_bean_name",id="b")})
public void testNamedMethod()
throws Exception
- Throws:
Exception
testDefaultNamedMethod
@SpecAssertions(value={@SpecAssertion(section="declaring_producer_method",id="bb"),@SpecAssertion(section="default_name",id="b"),@SpecAssertion(section="default_name",id="fb"),@SpecAssertion(section="declaring_bean_name",id="d")})
public void testDefaultNamedMethod()
throws Exception
- Throws:
Exception
testStereotypeSpecifiesScope
@SpecAssertions(value={@SpecAssertion(section="declaring_stereotypes",id="b"),@SpecAssertion(section="declaring_producer_method",id="ba"),@SpecAssertion(section="default_scope",id="c"),@SpecAssertion(section="declaring_producer_method",id="bd")})
public void testStereotypeSpecifiesScope()
throws Exception
- Throws:
Exception
testNonStaticProducerMethodNotInheritedBySpecializingSubclass
@SpecAssertions(value={@SpecAssertion(section="member_level_inheritance",id="da"),@SpecAssertion(section="specialization",id="cb")})
public void testNonStaticProducerMethodNotInheritedBySpecializingSubclass()
testNonStaticProducerMethodNotInherited
@SpecAssertions(value={@SpecAssertion(section="member_level_inheritance",id="da"),@SpecAssertion(section="member_level_inheritance",id="dg")})
public void testNonStaticProducerMethodNotInherited()
testBindingTypesAppliedToProducerMethodParameters
@SpecAssertions(value={@SpecAssertion(section="method_constructor_parameter_qualifiers",id="a"),@SpecAssertion(section="declaring_producer_method",id="i"),@SpecAssertion(section="declaring_producer_method",id="h"),@SpecAssertion(section="producer_or_disposer_methods_invocation",id="e")})
public void testBindingTypesAppliedToProducerMethodParameters()
- Note on the "3.3.2 h" assertion related to CDI section "3.3.2. Declaring a producer method" statement
"A producer method may have any number of parameters." JVM spec allows max 255 params. This test works with two producer
method params -
SpiderProducer.producesDeadliestTarantula(Tarantula, Tarantula). To fulfill the assertion
requirements we would need to test 255 producer methods with 1 to 255 parameter injection points.
testDependentProducerReturnsNullValue
@SpecAssertion(section="producer_method",
id="e")
public void testDependentProducerReturnsNullValue()
testNonDependentProducerReturnsNullValue
@SpecAssertion(section="producer_method",
id="f")
public void testNonDependentProducerReturnsNullValue()
testTypeVariableReturnType
@SpecAssertion(section="producer_method",
id="iaa")
public void testTypeVariableReturnType()
Copyright © 2008-2013 Seam Framework. All Rights Reserved.