[webbeans-commits] Webbeans SVN: r1385 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck: integration/implementation and 3 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Mon Feb 2 12:16:52 EST 2009
Author: dallen6
Date: 2009-02-02 12:16:52 -0500 (Mon, 02 Feb 2009)
New Revision: 1385
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
Log:
Minor changes; moved some integration tests for EJBs.
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java (from rev 1383, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-02-02 17:16:52 UTC (rev 1385)
@@ -0,0 +1,146 @@
+package org.jboss.webbeans.tck.integration.implementation.enterprise;
+
+import org.jboss.webbeans.tck.AbstractTest;
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.testng.annotations.Test;
+
+/**
+ * Sections
+ *
+ * 6.5. Lifecycle of stateful session beans 6.6. Lifecycle of stateless session
+ * and singleton beans 6.11. Lifecycle of EJBs
+ *
+ * Mostly overlapping with other tests...
+ *
+ * @author Nicklas Karlsson
+ *
+ * Spec version: PRD2
+ */
+public class EnterpriseBeanLifecycleTest extends AbstractTest
+{
+
+ /**
+ * When the create() method of a Bean object that represents a stateful
+ * session bean that is called, the container creates and returns a session
+ * bean proxy, as defined in Section 3.3.9, “Session bean proxies”.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "integration", "stub" })
+ @SpecAssertion(section = "6.5", id = "unknown")
+ public void testProxyCreated()
+ {
+ assert false;
+ }
+
+ /**
+ * When the destroy() method is called, the container removes the stateful
+ * session bean. The @PreDestroy callback must be invoked by the container.
+ */
+ @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "integration", "stub" })
+ @SpecAssertion(section = "6.5", id = "unknown")
+ public void testDestroyMethodCalled() throws Exception
+ {
+ // GoodDoggie.destructorCalled = false;
+ // deployBeans(GoodDoggie.class);
+ // new RunInDependentContext()
+ // {
+ //
+ // @Override
+ // protected void execute() throws Exception
+ // {
+ // Set<Bean<LocalGoodDoggie>> goodDoggieBeans =
+ // manager.resolveByType(LocalGoodDoggie.class);
+ // assert goodDoggieBeans.size() == 1;
+ // Bean<LocalGoodDoggie> bean = goodDoggieBeans.iterator().next();
+ // LocalGoodDoggie doggie = manager.getInstance(bean);
+ // bean.destroy(doggie);
+ // // TODO Need to verify that the remove method has been called
+ // }
+ //
+ // }.run();
+ assert false;
+ }
+
+ /**
+ * If the underlying EJB was already removed by direct invocation of a remove
+ * method by the application, the container ig- nores the instance.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "integration", "stub" })
+ @SpecAssertion(section = "6.5", id = "unknown")
+ public void testRemovedEjbIgnored()
+ {
+ assert false;
+ }
+
+ /**
+ * First, the container initializes the values of all injected fields. For
+ * each injected field, the container sets the value to the object returned
+ * by Manager.getInstanceToInject().
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "integration", "stub" })
+ @SpecAssertion(section = "6.11", id = "unknown")
+ public void testFieldInjectionsOnNonContextualEjbs()
+ {
+ assert false;
+ }
+
+ /**
+ * Next, if the EJB instance is a contextual instance of a bean, the
+ * container initializes the values of any fields with initial values
+ * specified in XML, as defined in Section 9.5.5, “Field initial value
+ * declarations”.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "integration", "stub" })
+ @SpecAssertion(section = "6.11", id = "unknown")
+ public void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
+ {
+ assert false;
+ }
+
+ /**
+ * Next, the container calls all initializer methods. For each initializer
+ * method parameter, the container passes the object returned by
+ * Manager.getInstanceToInject().
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "integration", "stub" })
+ @SpecAssertion(section = "6.11", id = "unknown")
+ public void testInitializerMethodsCalledWithCurrentParameterValues()
+ {
+ assert false;
+ }
+
+ /**
+ * Finally, the container builds the interceptor and decorator stacks for the
+ * instance as defined in Section A.3.10, “Interceptor stack creation” and
+ * Section A.5.8, “Decorator stack creation” and binds them to the instance.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "interceptors", "stub" })
+ @SpecAssertion(section = "6.11", id = "unknown")
+ public void testInterceptorStackIsBuilt()
+ {
+ assert false;
+ }
+
+ /**
+ * Finally, the container builds the interceptor and decorator stacks for the
+ * instance as defined in Section A.3.10, “Interceptor stack creation” and
+ * Section A.5.8, “Decorator stack creation” and binds them to the instance.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "decorators", "stub" })
+ @SpecAssertion(section = "6.11", id = "unknown")
+ public void testDecoratorStackIsBuilt()
+ {
+ assert false;
+ }
+
+ /**
+ * When the EJB container removes an instance of an EJB, the container
+ * destroys all dependent objects, after the @PreDestroy callback completes.
+ */
+ @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
+ @SpecAssertion(section = "6.11", id = "unknown")
+ public void testDependentObjectsDestroyed()
+ {
+ assert false;
+ }
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-02-02 16:27:27 UTC (rev 1384)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-02-02 17:16:52 UTC (rev 1385)
@@ -185,7 +185,7 @@
* UnserializableDependencyException must be thrown by the Web Bean manager
* at initialization time.
*/
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
@SpecAssertion(section = "8.4", id = "unknown")
public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
{
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-02-02 16:27:27 UTC (rev 1384)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-02-02 17:16:52 UTC (rev 1385)
@@ -1,168 +0,0 @@
-package org.jboss.webbeans.tck.unit.implementation.enterprise;
-
-import java.util.Set;
-
-import javax.inject.manager.Bean;
-
-import org.jboss.webbeans.tck.AbstractTest;
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.testng.annotations.Test;
-
-/**
- * Sections
- *
- * 6.5. Lifecycle of stateful session beans
- * 6.6. Lifecycle of stateless session and singleton beans
- * 6.11. Lifecycle of EJBs
- *
- * Mostly overlapping with other tests...
- *
- * @author Nicklas Karlsson
- *
- * Spec version: PRD2
- */
-public class EnterpriseBeanLifecycleTest extends AbstractTest
-{
-
- /**
- * When the create() method is called, the Web Bean manager creates and
- * returns an enterprise bean proxy
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.5", id = "unknown")
- public void testProxyCreated()
- {
- assert false;
- }
-
- /**
- * When the destroy() method is called, the Web Bean manager calls the Web
- * Bean remove method upon the proxy
- */
- @Test(groups = { "enterpriseBeans", "clientProxy", "lifecycle", "stub"})
- @SpecAssertion(section = "6.5", id = "unknown")
- public void testRemoveMethodCalled() throws Exception
- {
- GoodDoggie.destructorCalled = false;
- deployBeans(GoodDoggie.class);
- new RunInDependentContext()
- {
-
- @Override
- protected void execute() throws Exception
- {
- Set<Bean<LocalGoodDoggie>> goodDoggieBeans = manager.resolveByType(LocalGoodDoggie.class);
- assert goodDoggieBeans.size() == 1;
- Bean<LocalGoodDoggie> bean = goodDoggieBeans.iterator().next();
- LocalGoodDoggie doggie = manager.getInstance(bean);
- bean.destroy(doggie);
- }
-
- }.run();
- }
-
- /**
- * For each remove method parameter, the Web Bean manager passes the object
- * returned by Manager.getInstanceByType()
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.5", id = "unknown")
- public void testFieldInjections()
- {
- assert false;
- }
-
- /**
- * If the underlying EJB was already destroyed by direct invocation of a
- * remove method by the application, the Web Bean manager ignores the
- * instance, and is not required to call any remove method
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.5", id = "unknown")
- public void testNoRemoveMethodsCalledIfEnterpriseBeanAlreadyRemoved()
- {
- assert false;
- }
-
- /**
- * When the destroy() method is called, the Web Bean manager simply discards
- * the proxy and all EJB local object references.
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "removeMethod", "stub" })
- @SpecAssertion(section = "6.6", id = "unknown")
- public void testProxyAndLocalObjectReferencesDiscardedForStatelessEnterpriseBeans()
- {
- assert false;
- }
-
- /**
- * The Web Bean manager initializes the values of all injected fields. For
- * each injected field, the Web Bean manager sets the value to the object
- * returned by Manager.getInstanceByType().
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.11", id = "unknown")
- public void testFieldInjectionsOnRemoveMethods()
- {
- assert false;
- }
-
- /**
- * Next, if the EJB bean instance is an instance of a Web Bean, the Web Bean
- * manager initializes the values of any fields with initial values specified
- * in XML,
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.11", id = "unknown")
- public void testInitXMLDefinedValuesOnWebWeanEnterpriseBeans()
- {
- assert false;
- }
-
- /**
- * Next, the Web Bean manager calls all initializer methods. For each
- * initializer method parameter, the Web Bean manager passes the object
- * returned by Manager.getInstanceByType().
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.11", id = "unknown")
- public void testInitializerMethodsCalledWithCurrentParameterValues()
- {
- assert false;
- }
-
- /**
- * Finally, the Web Bean manager builds the interceptor and decorator stacks
- * for the instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "interceptors", "stub" })
- @SpecAssertion(section = "6.11", id = "unknown")
- public void testInterceptorStackIsBuilt()
- {
- assert false;
- }
-
- /**
- * Finally, the Web Bean manager builds the interceptor and decorator stacks
- * for the instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "decorators", "stub" })
- @SpecAssertion(section = "6.11", id = "unknown")
- public void testDecoratorStackIsBuilt()
- {
- assert false;
- }
-
- /**
- * When the EJB container destroys an instance of an EJB bean, the Web Bean
- * manager intercepts the @PreDestroy callback and destroys all dependent
- * objects, after the callback returns from the bean instance
- */
- @Test(groups = { "enterpriseBeans", "lifecycle", "stub" })
- @SpecAssertion(section = "6.11", id = "unknown")
- public void testDependentObjectsDestroyed()
- {
- assert false;
- }
-
-}
More information about the weld-commits
mailing list