Author: jharting
Date: 2011-04-13 08:00:11 -0400 (Wed, 13 Apr 2011)
New Revision: 7229
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyForSameCreationalContext2Test.java
Log:
CDITCK-209
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyForSameCreationalContext2Test.java
===================================================================
---
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyForSameCreationalContext2Test.java 2011-04-12
11:17:47 UTC (rev 7228)
+++
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyForSameCreationalContext2Test.java 2011-04-13
12:00:11 UTC (rev 7229)
@@ -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();
Show replies by date