org.jboss.cdi.tck.tests.lookup.dynamic.destroy.dependent
Class DestroyingDependentInstanceTest

java.lang.Object
  extended by org.jboss.arquillian.testng.Arquillian
      extended by org.jboss.cdi.tck.AbstractTest
          extended by org.jboss.cdi.tck.tests.lookup.dynamic.destroy.dependent.DestroyingDependentInstanceTest
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener

@SpecVersion(spec="cdi",
             version="20091101")
public class DestroyingDependentInstanceTest
extends AbstractTest

Test for CDI-139. It verifies that Instance.destroy() can be used to destroy a dependent bean instance and bean instances depending on the bean instance are destroyed as well.

This test was originally part of the Weld test suite.

Author:
Jozef Hartinger, Martin Kouba

Field Summary
 
Fields inherited from class org.jboss.cdi.tck.AbstractTest
beanManager
 
Fields inherited from class org.jboss.arquillian.testng.Arquillian
ARQUILLIAN_DATA_PROVIDER
 
Constructor Summary
DestroyingDependentInstanceTest()
           
 
Method Summary
static org.jboss.shrinkwrap.api.spec.WebArchive createTestArchive()
           
 void testDestroyingDependentInstances(javax.enterprise.inject.Instance<Foo> instance)
           
 void testDestroyingInterceptedDependentBean(javax.enterprise.inject.Instance<Bar> instance)
           
 
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
 

Constructor Detail

DestroyingDependentInstanceTest

public DestroyingDependentInstanceTest()
Method Detail

createTestArchive

@Deployment
public static org.jboss.shrinkwrap.api.spec.WebArchive createTestArchive()

testDestroyingDependentInstances

@SpecAssertions(value=@SpecAssertion(section="dynamic_lookup",id="n"))
public void testDestroyingDependentInstances(javax.enterprise.inject.Instance<Foo> instance)

testDestroyingInterceptedDependentBean

@SpecAssertions(value=@SpecAssertion(section="dynamic_lookup",id="n"))
public void testDestroyingInterceptedDependentBean(javax.enterprise.inject.Instance<Bar> instance)


Copyright © 2008-2013 Seam Framework. All Rights Reserved.