Author: petemuir
Date: 2010-10-30 16:42:39 -0400 (Sat, 30 Oct 2010)
New Revision: 7067
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyedInstanceReturnedByGetTest.java
cdi-tck/branches/1.0/impl/src/main/resources/tck-tests.xml
Log:
CDITCK-183
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyedInstanceReturnedByGetTest.java
===================================================================
---
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyedInstanceReturnedByGetTest.java 2010-10-30
19:15:59 UTC (rev 7066)
+++
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/DestroyedInstanceReturnedByGetTest.java 2010-10-30
20:42:39 UTC (rev 7067)
@@ -18,6 +18,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
@@ -44,10 +45,11 @@
CreationalContext<MySessionBean> sessionCreationalContext =
getCurrentManager().createCreationalContext(mySessionBean);
MySessionBean beanInstance = mySessionBean.create(sessionCreationalContext);
assert beanInstance != null;
- destroyContext(getCurrentManager().getContext(SessionScoped.class));
- setContextActive(getCurrentManager().getContext(SessionScoped.class));
+ Context sessionContext = getCurrentManager().getContext(SessionScoped.class);
+ destroyContext(sessionContext);
+ setContextActive(sessionContext);
- beanInstance =
getCurrentManager().getContext(SessionScoped.class).get(mySessionBean);
+ beanInstance = sessionContext.get(mySessionBean);
assert beanInstance == null;
Bean<MyApplicationBean> myApplicationBean =
getBeans(MyApplicationBean.class).iterator().next();
@@ -55,10 +57,11 @@
MyApplicationBean myApplicationBeanInstance =
myApplicationBean.create(applicationCreationalContext);
assert myApplicationBeanInstance != null;
- destroyContext(getCurrentManager().getContext(ApplicationScoped.class));
- setContextActive(getCurrentManager().getContext(ApplicationScoped.class));
+ Context applicationContext =
getCurrentManager().getContext(ApplicationScoped.class);
+ destroyContext(applicationContext);
+ setContextActive(applicationContext);
- myApplicationBeanInstance =
getCurrentManager().getContext(ApplicationScoped.class).get(myApplicationBean);
+ myApplicationBeanInstance = applicationContext.get(myApplicationBean);
assert myApplicationBeanInstance == null;
}
Modified: cdi-tck/branches/1.0/impl/src/main/resources/tck-tests.xml
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/resources/tck-tests.xml 2010-10-30 19:15:59 UTC
(rev 7066)
+++ cdi-tck/branches/1.0/impl/src/main/resources/tck-tests.xml 2010-10-30 20:42:39 UTC
(rev 7067)
@@ -16,13 +16,6 @@
<classes>
<!-- Issues in the TCK -->
- <!-- CDITCK-183 -->
- <class
name="org.jboss.jsr299.tck.tests.context.DestroyedInstanceReturnedByGetTest">
- <methods>
- <exclude name="testDestroyedInstanceMustNotBeReturnedByGet"
/>
- </methods>
- </class>
-
<!-- CDITCK-185 -->
<class
name="org.jboss.jsr299.tck.tests.inheritance.specialization.enterprise.EnterpriseBeanSpecializationTest">
<methods>
Show replies by date