[webbeans-commits] Webbeans SVN: r1564 - in tck/trunk/impl/src/main: resources and 1 other directory.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Feb 18 02:46:34 EST 2009


Author: shane.bryzak at jboss.com
Date: 2009-02-18 02:46:33 -0500 (Wed, 18 Feb 2009)
New Revision: 1564

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/dependent/DependentContextTest.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
map dependent context tests to assertions

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/dependent/DependentContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/dependent/DependentContextTest.java	2009-02-18 01:16:36 UTC (rev 1563)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/dependent/DependentContextTest.java	2009-02-18 07:46:33 UTC (rev 1564)
@@ -16,12 +16,8 @@
  */
 public class DependentContextTest extends AbstractDeclarativeTest
 {
-   /**
-    * 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")
+   @SpecAssertion(section = "8.3", id = "a")
    public void testInstanceNotSharedBetweenInjectionPoints()
    {
       deployBeans(Fox.class, FoxRun.class);
@@ -34,14 +30,8 @@
       assert !foxRun.fox.equals(foxRun.anotherFox);
    }
 
-   /**
-    * Any injected instance of the (@Dependent scoped) bean is bound to the
-    * lifecycle of the bean, servlet or EJB into which it is injected.
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "stub" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "b")
    public void testDependentBeansBoundToLifecycleOfContainingBean() throws Exception
    {
       // Once injected, dependent beans will be destroyed when the
@@ -50,12 +40,8 @@
       testDestroyingParentDestroysDependents();
    }
 
-   /**
-    * 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")
+   @SpecAssertion(section = "8.3", id = "c")
    public void testInstanceUsedForElEvaluationNotShared() throws Exception
    {
       deployBeans(Fox.class);
@@ -74,13 +60,8 @@
       }.run();
    }
 
-   /**
-    * 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")
+   @SpecAssertion(section = "8.3", id = "d")
    public void testInstanceUsedForProducerMethodNotShared() throws Exception
    {
       deployBeans(SpiderProducer.class);
@@ -92,13 +73,8 @@
       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
-    */
    @Test(groups = { "contexts", "producerMethod" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "d")
    public void testInstanceUsedForProducerFieldNotShared() throws Exception
    {
       deployBeans(OtherSpiderProducer.class);
@@ -110,15 +86,8 @@
       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
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "broken", "contexts", "disposalMethod" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "d")
    public void testInstanceUsedForDisposalMethodNotShared() throws Exception
    {
 //      deployBeans(SpiderProducer.class);
@@ -140,15 +109,8 @@
 //      }.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
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "observerMethod" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "d")
    public void testInstanceUsedForObserverMethodNotShared() throws Exception
    {
       deployBeans(HorseStable.class);
@@ -167,12 +129,8 @@
       }.run();
    }
 
-   /**
-    * Every invocation of the get() operation of the Context object for the @Dependent
-    * scope with a CreationalContext re- turns a new instance of the given bean.
-    */
    @Test(groups = "contexts")
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "e")
    public void testContextGetWithCreateTrueReturnsNewInstance() throws Exception
    {
       deployBeans(Fox.class);
@@ -193,12 +151,8 @@
       }.run();
    }
 
-   /**
-    * Every invocation of the get() operation of the Context object for the @Dependent
-    * scope with no CreationalContext re- turns a null value.
-    */
    @Test(groups = "contexts")
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "f")
    public void testContextGetWithCreateFalseReturnsNull() throws Exception
    {
       deployBeans(Fox.class);
@@ -218,23 +172,15 @@
       }.run();
    }
 
-   /**
-    * The @Dependent scope is inactive except:
-    */
    @Test(groups = { "contexts", "underInvestigation" }, expectedExceptions = ContextNotActiveException.class)
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "g")
    public void testContextIsInactive()
    {
       //getCurrentManager().getContext(Dependent.class);
    }
 
-   /**
-    * 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 = { "contexts", "producerMethod" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "g")
    public void testContextIsActiveWhenInvokingProducerMethod()
    {
       deployBeans(SpiderProducer.class);
@@ -244,13 +190,8 @@
       assert SpiderProducer.isDependentContextActive();
    }
 
-   /**
-    * 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", "underInvestigation" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "g")
    public void testContextIsActiveWhenInvokingProducerField()
    {
       // TODO Rather difficult to detect anything when a producer field is
@@ -258,13 +199,8 @@
       assert false;
    }
 
-   /**
-    * 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 = { "broken", "contexts", "disposalMethod" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "g")
    public void testContextIsActiveWhenInvokingDisposalMethod()
    {
 //      deployBeans(SpiderProducer.class);
@@ -276,13 +212,8 @@
 //      assert SpiderProducer.isDependentContextActive();
    }
 
-   /**
-    * 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 = { "contexts", "observerMethod" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "g")
    public void testContextIsActiveWhenInvokingObserverMethod()
    {
       deployBeans(HorseStable.class);
@@ -290,12 +221,8 @@
       assert HorseStable.isDependentContextActive();
    }
 
-   /**
-    * while a Unified EL expression is evaluated, or
-    * @throws Exception 
-    */
    @Test(groups = { "contexts", "el" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "h")
    public void testContextIsActiveWhenEvaluatingElExpression() throws Exception
    {
       deployBeans(SensitiveFox.class);
@@ -312,11 +239,8 @@
       }.run();
    }
 
-   /**
-    * while an observer method is invoked, or
-    */
    @Test(groups = { "contexts", "observerMethod" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "i")
    public void testContextIsActiveWhenInvokingObserver()
    {
       deployBeans(ApplicationHorseStable.class);
@@ -324,14 +248,8 @@
       assert ApplicationHorseStable.isDependentContextActive();
    }
 
-   /**
-    * when the container is creating or destroying a contextual instance of a
-    * bean or injecting its dependencies, or
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "beanLifecycle" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "j")
    public void testContextIsActiveDuringBeanCreation() throws Exception
    {
       deployBeans(SensitiveFox.class);
@@ -350,12 +268,8 @@
       }.run();
    }
 
-   /**
-    * when the container is creating or destroying a contextual instance of a
-    * bean or injecting its dependencies, or
-    */
    @Test(groups = { "broken", "contexts", "beanDestruction" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3", id = "j")
    public void testContextIsActiveDuringBeanDestruction()
    {
       // Since the only way to check the context during bean
@@ -364,12 +278,8 @@
       this.testContextIsActiveWhenInvokingDisposalMethod();
    }
 
-   /**
-    * 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")
+   @SpecAssertion(section = "8.3", id = "j")
    public void testContextIsActiveDuringInjection()
    {
       deployBeans(FoxRun.class, Fox.class);
@@ -378,14 +288,8 @@
       assert foxRun.fox != null;
    }
 
-   /**
-    * destroy all dependent objects of a contextual bean instance when the
-    * instance is destroyed,
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "beanDestruction" })
-   @SpecAssertion(section = "8.3.2", id = "unknown")
+   @SpecAssertion(section = "8.3.2", id = "a")
    public void testDestroyingParentDestroysDependents() throws Exception
    {
       deployBeans(Farm.class, Horse.class, Stable.class);
@@ -408,14 +312,8 @@
       }.run();
    }
 
-   /**
-    * destroy all @Dependent scoped contextual instances created during an EL
-    * expression evaluation when the evaluation completes, and
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "el"})
-   @SpecAssertion(section = "8.3.2", id = "unknown")
+   @SpecAssertion(section = "8.3.2", id = "c")
    public void testDependentsDestroyedWhenElEvaluationCompletes() throws Exception
    {
       deployBeans(Fox.class);
@@ -435,15 +333,8 @@
       }.run();
    }
 
-   /**
-    * destroy any @Dependent scoped contextual instance created to receive a
-    * producer method, producer field, disposal method or observer method
-    * invocation when the invocation completes
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "producerMethod" })
-   @SpecAssertion(section = "8.3.2", id = "unknown")
+   @SpecAssertion(section = "8.3.2", id = "d")
    public void testDependentsDestroyedWhenProducerMethodCompletes() throws Exception
    {
       deployBeans(SpiderProducer.class);
@@ -469,15 +360,8 @@
       }.run();
    }
 
-   /**
-    * destroy any @Dependent scoped contextual instance created to receive a
-    * producer method, producer field, disposal method or observer method
-    * invocation when the invocation completes
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "producerField" })
-   @SpecAssertion(section = "8.3.2", id = "unknown")
+   @SpecAssertion(section = "8.3.2", id = "d")
    public void testDependentsDestroyedWhenProducerFieldCompletes() throws Exception
    {
       deployBeans(OtherSpiderProducer.class);
@@ -503,15 +387,8 @@
       }.run();
    }
 
-   /**
-    * destroy any @Dependent scoped contextual instance created to receive a
-    * producer method, producer field, disposal method or observer method
-    * invocation when the invocation completes
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "disposalMethod" })
-   @SpecAssertion(section = "8.3.2", id = "unknown")
+   @SpecAssertion(section = "8.3.2", id = "d")
    public void testDependentsDestroyedWhenDisposalMethodCompletes() throws Exception
    {
       deployBeans(SpiderProducer.class);
@@ -533,15 +410,8 @@
       }.run();
    }
 
-   /**
-    * destroy any @Dependent scoped contextual instance created to receive a
-    * producer method, producer field, disposal method or observer method
-    * invocation when the invocation completes
-    * 
-    * @throws Exception
-    */
    @Test(groups = { "contexts", "observerMethod" })
-   @SpecAssertion(section = "8.3", id = "unknown")
+   @SpecAssertion(section = "8.3.2", id = "d")
    public void testDependentsDestroyedWhenObserverMethodEvaluationCompletes() throws Exception
    {
       deployBeans(HorseStable.class);

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-18 01:16:36 UTC (rev 1563)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-18 07:46:33 UTC (rev 1564)
@@ -2660,8 +2660,7 @@
     </assertion>
     
     <assertion id="g">
-      <text>The @Dependent scope is inactive except 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</text>
+      <text>The @Dependent scope is inactive except 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</text>
       <note>Assertions g through k are all related and should be treated as "or" conditions</note>
     </assertion>
     




More information about the weld-commits mailing list