[weld-commits] Weld SVN: r7230 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Wed Apr 13 08:00:21 EDT 2011
Author: jharting
Date: 2011-04-13 08:00:21 -0400 (Wed, 13 Apr 2011)
New Revision: 7230
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyForSameCreationalContext2Test.java
Log:
CDITCK-209
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyForSameCreationalContext2Test.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyForSameCreationalContext2Test.java 2011-04-13 12:00:11 UTC (rev 7229)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyForSameCreationalContext2Test.java 2011-04-13 12:00:21 UTC (rev 7230)
@@ -16,7 +16,6 @@
*/
package org.jboss.jsr299.tck.tests.context;
-import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.context.SessionScoped;
import javax.enterprise.context.spi.Context;
@@ -46,7 +45,6 @@
// Note that this is an indirect effect
Context sessionContext = getCurrentManager().getContext(SessionScoped.class);
Context requestContext = getCurrentManager().getContext(RequestScoped.class);
- Context appContext = getCurrentManager().getContext(ApplicationScoped.class);
// We also test this directly using a custom contextual, and ensuring that the same contextual is passed to both methods
DummyContextual contextual = new DummyContextual();
@@ -55,13 +53,8 @@
destroyContext(sessionContext);
assert contextual.getCreationalContextPassedToCreate() == contextual.getCreationalContextPassedToDestroy();
- // Do it for other contexts
+ // Also test the request context
contextual = new DummyContextual();
- appContext.get(contextual, getCurrentManager().createCreationalContext(contextual));
- destroyContext(appContext);
- assert contextual.getCreationalContextPassedToCreate() == contextual.getCreationalContextPassedToDestroy();
-
- contextual = new DummyContextual();
requestContext.get(contextual, getCurrentManager().createCreationalContext(contextual));
destroyContext(requestContext);
assert contextual.getCreationalContextPassedToCreate() == contextual.getCreationalContextPassedToDestroy();
More information about the weld-commits
mailing list