[webbeans-commits] Webbeans SVN: r1391 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck: integration/implementation/enterprise and 1 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Mon Feb 2 17:23:54 EST 2009
Author: dallen6
Date: 2009-02-02 17:23:54 -0500 (Mon, 02 Feb 2009)
New Revision: 1391
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/MyCreationalContext.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
Log:
Updated some enterprise bean and dependent context tests to match assertions in PRD2.
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java 2009-02-02 22:23:54 UTC (rev 1391)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.tck.impl;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+/**
+ * @author Pete Muir
+ *
+ */
+ at Documented
+ at Target(ElementType.TYPE)
+public @interface SpecVersion
+{
+ String value();
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/SpecVersion.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-02-02 21:23:55 UTC (rev 1390)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/implementation/enterprise/EnterpriseBeanLifecycleTest.java 2009-02-02 22:23:54 UTC (rev 1391)
@@ -2,20 +2,22 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
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
+ * 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
*/
+ at SpecVersion("PRD2")
public class EnterpriseBeanLifecycleTest extends AbstractTest
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-02-02 21:23:55 UTC (rev 1390)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/DependentContextTest.java 2009-02-02 22:23:54 UTC (rev 1391)
@@ -2,8 +2,6 @@
import static org.jboss.webbeans.tck.impl.WebBeansTCKImpl.configuration;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
import java.util.Set;
import javax.context.Context;
@@ -13,17 +11,15 @@
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.util.MockCreationalContext;
+import org.jboss.webbeans.tck.impl.SpecVersion;
import org.testng.annotations.Test;
-/**
- * Spec version: PRD2
- */
+ at SpecVersion("PRD2")
public class DependentContextTest extends AbstractTest
{
/**
- * No injected instance of the (@Dependent-scoped) Web Bean is ever shared between multiple
- * injection points.
+ * No injected instance of the (@Dependent-scoped) Web Bean is ever shared
+ * between multiple injection points.
*/
@Test(groups = { "contexts", "injection" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -37,21 +33,32 @@
assert foxRunBeans.size() == 1;
Bean<FoxRun> foxRunBean = foxRunBeans.iterator().next();
manager.addBean(foxBean);
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ FoxRun foxRun = foxRunBean.create(new MyCreationalContext<FoxRun>());
assert !foxRun.fox.equals(foxRun.anotherFox);
}
/**
- * Any instance of the (@Dependent-scoped) Web Bean that is used to evaluate a Unified EL
- * expression exists to service that evaluation only.
+ * Any injected instance of the (@Dependent scoped) bean is bound to the
+ * lifecycle of the bean, servlet or EJB into which it is injected.
*/
- @Test(groups = { "contexts", "el"})
+ @Test(groups = { "contexts", "el", "stub" })
@SpecAssertion(section = "8.3", id = "unknown")
+ public void testDependentBeansBoundToLifecycleOfContainingBean()
+ {
+ assert false;
+ }
+
+ /**
+ * Any instance of the (@Dependent scoped) bean that is used to evaluate a
+ * Unified EL expression exists to service that evaluation only.
+ */
+ @Test(groups = { "contexts", "el" })
+ @SpecAssertion(section = "8.3", id = "unknown")
public void testInstanceUsedForElEvaluationNotShared() throws Exception
- {
+ {
deployBeans(Fox.class);
new RunInDependentContext()
- {
+ {
@Override
protected void execute() throws Exception
{
@@ -64,13 +71,13 @@
Fox fox2 = configuration().getContainers().evaluateValueExpression("#{fox}", Fox.class);
assert !fox1.equals(fox2);
}
- }.run();
+ }.run();
}
/**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
+ * Any instance of the (@Dependent scoped) bean that receives a producer
+ * method, producer field, disposal method or observer method invocation
+ * exists to service that invocation only.
*/
@Test(groups = { "contexts", "producerMethod" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -78,17 +85,17 @@
{
deployBeans(SpiderProducer.class);
Bean<Tarantula> tarantulaBean = manager.resolveByType(Tarantula.class).iterator().next();
- Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ Tarantula tarantula = tarantulaBean.create(new MyCreationalContext<Tarantula>());
+ Tarantula tarantula2 = tarantulaBean.create(new MyCreationalContext<Tarantula>());
assert tarantula != null;
assert tarantula2 != null;
assert tarantula != tarantula2;
}
/**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer
+ * method, producer field, disposal method or observer method invocation
+ * exists to service that invocation only
*/
@Test(groups = { "contexts", "producerMethod" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -96,17 +103,17 @@
{
deployBeans(OtherSpiderProducer.class);
Bean<Tarantula> tarantulaBean = manager.resolveByType(Tarantula.class).iterator().next();
- Tarantula tarantula = tarantulaBean.create(new MockCreationalContext<Tarantula>());
- Tarantula tarantula2 = tarantulaBean.create(new MockCreationalContext<Tarantula>());
+ Tarantula tarantula = tarantulaBean.create(new MyCreationalContext<Tarantula>());
+ Tarantula tarantula2 = tarantulaBean.create(new MyCreationalContext<Tarantula>());
assert tarantula != null;
assert tarantula2 != null;
assert tarantula != tarantula2;
}
/**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer
+ * method, producer field, disposal method or observer method invocation
+ * exists to service that invocation only
*/
@Test(groups = { "stub", "contexts", "disposalMethod" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -116,9 +123,9 @@
}
/**
- * Any instance of the (@Dependent-scoped) Web Bean that receives a producer method, producer
- * field, disposal method or observer method invocation exists to service
- * that invocation only
+ * Any instance of the (@Dependent-scoped) Web Bean that receives a producer
+ * method, producer field, disposal method or observer method invocation
+ * exists to service that invocation only
*/
@Test(groups = { "stub", "contexts", "observerMethod" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -129,17 +136,16 @@
/**
* Every invocation of the get() operation of the Context object for the @Dependent
- * scope with the value true for the create parameter returns a new instance
- * of the given Web Bean
+ * scope with a CreationalContext re- turns a new instance of the given bean.
*/
@Test(groups = "contexts")
@SpecAssertion(section = "8.3", id = "unknown")
- public void testContextGetWithCreateTrueReturnsNewInstance() throws Exception
+ public void testContextGetWithCreateTrueReturnsNewInstance() throws Exception
{
deployBeans(Fox.class);
new RunInDependentContext()
{
-
+
@Override
protected void execute() throws Exception
{
@@ -147,16 +153,16 @@
assert foxBeans.size() == 1;
Bean<Fox> foxBean = foxBeans.iterator().next();
Context context = manager.getContext(Dependent.class);
- assert context.get(foxBean, new MockCreationalContext<Fox>()) != null;
- assert context.get(foxBean, new MockCreationalContext<Fox>()) instanceof Fox;
+ assert context.get(foxBean, new MyCreationalContext<Fox>()) != null;
+ assert context.get(foxBean, new MyCreationalContext<Fox>()) instanceof Fox;
}
-
+
}.run();
}
/**
* Every invocation of the get() operation of the Context object for the @Dependent
- * scope with the value false for the create parameter returns a null value
+ * scope with no CreationalContext re- turns a null value.
*/
@Test(groups = "contexts")
@SpecAssertion(section = "8.3", id = "unknown")
@@ -165,7 +171,7 @@
deployBeans(Fox.class);
new RunInDependentContext()
{
-
+
@Override
protected void execute() throws Exception
{
@@ -175,14 +181,14 @@
Context context = manager.getContext(Dependent.class);
assert context.get(foxBean, null) == null;
}
-
+
}.run();
}
/**
* The @Dependent scope is inactive except:
*/
- @Test(groups = {"contexts"}, expectedExceptions = ContextNotActiveException.class)
+ @Test(groups = { "contexts" }, expectedExceptions = ContextNotActiveException.class)
@SpecAssertion(section = "8.3", id = "unknown")
public void testContextIsInactive()
{
@@ -190,9 +196,9 @@
}
/**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
+ * when an instance of a bean with scope @Dependent is created by the
+ * container to receive a producer method, producer field, disposal method or
+ * observer method invocation, or
*/
@Test(groups = { "stub", "contexts", "producerMethod" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -202,22 +208,22 @@
}
/**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
+ * when an instance of a bean with scope @Dependent is created by the
+ * container to receive a producer method, producer field, disposal method or
+ * observer method invocation, or
*/
@Test(groups = { "stub", "contexts", "producerField" })
@SpecAssertion(section = "8.3", id = "unknown")
public void testContextIsActiveWhenInvokingProducerField()
{
assert false;
- //assert manager.getContext(Dependent.class).isActive();
+ // assert manager.getContext(Dependent.class).isActive();
}
/**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
+ * when an instance of a bean with scope @Dependent is created by the
+ * container to receive a producer method, producer field, disposal method or
+ * observer method invocation, or
*/
@Test(groups = { "stub", "contexts", "disposalMethod" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -227,9 +233,9 @@
}
/**
- * when an instance of a Web Bean with scope @Dependent is created by the Web
- * Bean manager to receive a producer method, producer field, disposal method
- * or observer method invocation, or
+ * when an instance of a bean with scope @Dependent is created by the
+ * container to receive a producer method, producer field, disposal method or
+ * observer method invocation, or
*/
@Test(groups = { "stub", "contexts", "observerMethod" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -249,9 +255,19 @@
}
/**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
+ * while an observer method is invoked, or
*/
+ @Test(groups = { "stub", "contexts", "el" })
+ @SpecAssertion(section = "8.3", id = "unknown")
+ public void testContextIsActiveWhenInvokingObserver()
+ {
+ assert false;
+ }
+
+ /**
+ * when the container is creating or destroying a contextual instance of a
+ * bean or injecting its dependencies, or
+ */
@Test(groups = { "contexts", "beanLifecycle" })
@SpecAssertion(section = "8.3", id = "unknown")
public void testContextIsActiveDuringBeanCreation()
@@ -259,13 +275,13 @@
// Slightly roundabout, but I can't see a better way to test atm
deployBeans(FoxRun.class, Fox.class);
Bean<FoxRun> foxRunBean = manager.resolveByType(FoxRun.class).iterator().next();
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ FoxRun foxRun = foxRunBean.create(new MyCreationalContext<FoxRun>());
assert foxRun.fox != null;
}
/**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
+ * when the container is creating or destroying a contextual instance of a
+ * bean or injecting its dependencies, or
*/
@Test(groups = { "stub", "contexts", "beanDestruction" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -275,8 +291,8 @@
}
/**
- * when the Web Bean manager is creating or destroying a Web Bean instance or
- * injecting its dependencies, or
+ * when the container is creating or destroying a contextual instance of a
+ * bean or injecting its dependencies, or
*/
@Test(groups = { "contexts", "injection" })
@SpecAssertion(section = "8.4", id = "unknown")
@@ -284,16 +300,15 @@
{
deployBeans(FoxRun.class, Fox.class);
Bean<FoxRun> foxRunBean = manager.resolveByType(FoxRun.class).iterator().next();
- FoxRun foxRun = foxRunBean.create(new MockCreationalContext<FoxRun>());
+ FoxRun foxRun = foxRunBean.create(new MyCreationalContext<FoxRun>());
assert foxRun.fox != null;
}
/**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
+ * when the container is injecting dependencies of an EJB or servlet or when
+ * a @PostConstruct or @PreDestroy callback is invoked by the EJB container.
*/
- @Test(groups = { "contexts", "injection", "stub", "ejb3" })
+ @Test(groups = { "contexts", "injection", "stub", "ejb3", "integration" })
@SpecAssertion(section = "8.3", id = "unknown")
public void testContextIsActiveDuringEJBDependencyInjection()
{
@@ -301,9 +316,8 @@
}
/**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
+ * when the container is injecting dependencies of an EJB or servlet or when
+ * a @PostConstruct or @PreDestroy callback is invoked by the EJB container.
*/
@Test(groups = { "contexts", "injection", "stub", "servlet" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -313,9 +327,8 @@
}
/**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
+ * when the container is injecting dependencies of an EJB or servlet or when
+ * a @PostConstruct or @PreDestroy callback is invoked by the EJB container.
*/
@Test(groups = { "contexts", "postconstruct", "stub", "ejb3" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -325,9 +338,8 @@
}
/**
- * when the Web Bean manager is injecting dependencies of an EJB bean or
- * Servlet or when an EJB bean @PostConstruct or @PreDestroy callback is
- * invoked by the EJB container
+ * when the container is injecting dependencies of an EJB or servlet or when
+ * a @PostConstruct or @PreDestroy callback is invoked by the EJB container.
*/
@Test(groups = { "contexts", "predestroy", "stub", "ejb3" })
@SpecAssertion(section = "8.3", id = "unknown")
@@ -337,197 +349,34 @@
}
/**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
+ * A bean, EJB or servlet may obtain an instance of a bean with scope @Dependent
+ * via dependency injection or by calling Manager.getInstance(),
+ * Manager.getInstanceByType() or Instance.get() when the @Dependent scope is
+ * active.
*/
- @Test(groups = { "stub", "contexts", "constructor" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromConstructor()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "removeMethod" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromRemoveMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "initalizerMethod" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromInitializerMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "producerMethod" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromProducerMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "disposalMethod" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromDisposalMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "preDestroy" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromPreDestroy()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "postConstruct" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromPostConstruct()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "interceptor" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromInterceptorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * A Web Bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from the Web Bean constructor, from the
- * Web Bean remove method, from initializer methods, from producer methods,
- * from disposal methods, from @PostConstruct and @PreDestroy callbacks and
- * from Web Beans interceptors or decorators for any of these methods
- */
- @Test(groups = { "stub", "contexts", "decorator" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testWebBeanMayCreateInstanceFromDecoratorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
@Test(groups = { "stub", "contexts", "ejb3", "initializerMethod" })
@SpecAssertion(section = "8.3.1", id = "unknown")
- public void testEjbBeanMayCreateInstanceFromInitializer()
+ public void testEjbBeanMayCreateInstanceWheneverScopeActive()
{
assert false;
}
/**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
+ * A bean, EJB or servlet may obtain an instance of a bean with scope @Dependent
+ * via dependency injection or by calling Manager.getInstance(),
+ * Manager.getInstanceByType() or Instance.get() when the @Dependent scope is
+ * active.
*/
- @Test(groups = { "stub", "contexts", "ejb3", "postConstruct" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testEjbBeanMayCreateInstanceFromPostConstruct()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "preDestroy" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testEjbBeanMayCreateInstanceFromPreDestroy()
- {
- assert false;
- }
-
- /**
- * An EJB bean may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods, from @PostConstruct
- * and @PreDestroy callbacks and from Web Beans interceptors for these
- * methods.
- */
- @Test(groups = { "stub", "contexts", "ejb3", "interceptor" })
- @SpecAssertion(section = "8.3.1", id = "unknown")
- public void testEjbBeanMayCreateInstanceFromInterceptorOfActiveMethod()
- {
- assert false;
- }
-
- /**
- * A Servlet may create an instance of a Web Bean with scope type @Dependent
- * by calling Manager.getInstance() from initializer methods
- */
@Test(groups = { "stub", "contexts", "servlet", "initializerMethod" })
@SpecAssertion(section = "8.3.1", id = "unknown")
- public void testServletBeanMayCreateInstanceFromInitializer()
+ public void testServletBeanMayCreateInstanceWheneverScopeIsActive()
{
assert false;
}
/**
- * destroy all dependent objects of a Web Bean instance when the instance is
- * destroyed,
+ * destroy all dependent objects of a contextual bean instance when the
+ * instance is destroyed,
*/
@Test(groups = { "broken", "contexts", "beanDestruction" })
@SpecAssertion(section = "8.3.2", id = "unknown")
@@ -548,7 +397,7 @@
* destroy all dependent objects of an EJB bean or Servlet when the EJB bean
* or Servlet is destroyed,
*/
- @Test(groups = { "stub", "contexts", "ejb3" })
+ @Test(groups = { "stub", "contexts", "ejb3", "integration" })
@SpecAssertion(section = "8.3.2", id = "unknown")
public void testDestroyingEjbDestroysDependents()
{
@@ -559,7 +408,7 @@
* destroy all dependent objects of an EJB bean or Servlet when the EJB bean
* or Servlet is destroyed,
*/
- @Test(groups = { "stub", "contexts", "servlet" })
+ @Test(groups = { "stub", "contexts", "servlet", "integration" })
@SpecAssertion(section = "8.3.2", id = "unknown")
public void testDestroyingServletDestroysDependents()
{
@@ -588,7 +437,7 @@
{
assert false;
}
-
+
/**
* destroy any @Dependent scoped contextual instance created to receive a
* producer method, producer field, disposal method or observer method
@@ -612,7 +461,7 @@
{
assert false;
}
-
+
/**
* destroy any @Dependent scoped contextual instance created to receive a
* producer method, producer field, disposal method or observer method
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/MyCreationalContext.java (from rev 1383, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/impl/util/MockCreationalContext.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/MyCreationalContext.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/MyCreationalContext.java 2009-02-02 22:23:54 UTC (rev 1391)
@@ -0,0 +1,13 @@
+package org.jboss.webbeans.tck.unit.context.dependent;
+
+import javax.context.CreationalContext;
+
+public class MyCreationalContext<T> implements CreationalContext<T>
+{
+
+ public void push(T incompleteInstance)
+ {
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/dependent/MyCreationalContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the weld-commits
mailing list