[webbeans-commits] Webbeans SVN: r1723 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/event and 1 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Feb 26 14:16:58 EST 2009


Author: dallen6
Date: 2009-02-26 14:16:58 -0500 (Thu, 26 Feb 2009)
New Revision: 1723

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Additional assertion changes for section 7

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java	2009-02-26 16:14:07 UTC (rev 1722)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java	2009-02-26 19:16:58 UTC (rev 1723)
@@ -150,7 +150,7 @@
     * completion phase.
     */
    @Test(groups = { "stub", "events" })
-   @SpecAssertion(section = "7.5.8", id = "unknown")
+   @SpecAssertion(section = "7.5.8", id = "e")
    public void testAsynchronousTransactionalObserverCalledAfterCompletion()
    {
       assert false;
@@ -163,7 +163,7 @@
     * phase.
     */
    @Test(groups = { "stub", "events" })
-   @SpecAssertion(section = "7.5.8", id = "unknown")
+   @SpecAssertion(section = "7.5.8", id = "f")
    public void testTransactionalObserverMethodCalledDuringTransactionCompletionPhase()
    {
       assert false;

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java	2009-02-26 16:14:07 UTC (rev 1722)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java	2009-02-26 19:16:58 UTC (rev 1723)
@@ -326,7 +326,7 @@
     * Manager.getInstanceToInject() to each of the other parameters.
     */
    @Test(groups = { "events" })
-   @SpecAssertions( { @SpecAssertion(section = "7.5.4", id = "a"), @SpecAssertion(section = "7.5.8", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "7.5.4", id = "a"), @SpecAssertion(section = "7.5.8", id = "j") })
    public void testObserverMethodReceivesInjectionsOnNonObservesParameters()
    {
       Set<Bean<Object>> beans = getCurrentManager().resolveByType(Object.class);
@@ -399,14 +399,14 @@
    }
 
    @Test(groups = { "stub", "events" })
-   @SpecAssertion(section = "7.5.8", id = "e")
+   @SpecAssertions( { @SpecAssertion(section = "7.5.8", id = "c"), @SpecAssertion(section = "7.5.8", id = "g")} )
    public void testAsynchronousObserverMethodCalledAsynchronously()
    {
       assert false;
    }
 
    @Test(groups = { "stub", "events" })
-   @SpecAssertion(section = "7.5.8", id = "f")
+   @SpecAssertions( { @SpecAssertion(section = "7.5.8", id = "b"), @SpecAssertion(section = "7.5.8", id = "h")} )
    public void testObserverMethodCalledImmediately()
    {
 
@@ -414,8 +414,7 @@
    }
 
    @Test(groups = { "events" })
-   @SpecAssertions( { @SpecAssertion(section = "7.5", id = "c"), @SpecAssertion(section = "7.5.8", id = "i")} )
-   @SpecAssertion(section = "7.5.8", id = "i")
+   @SpecAssertions( { @SpecAssertion(section = "7.5", id = "c"), @SpecAssertion(section = "7.5.8", id = "k")} )
    public void testStaticObserverMethodInvoked()
    {
       getCurrentManager().fireEvent(new Delivery());
@@ -425,40 +424,51 @@
    /**
     * Otherwise, if the observer method is non-static, the container must:
     * 
-    * obtain the Bean object for the most specialized bean that specializes the
-    * bean which declares the observer method, and then
+    * • obtain the Bean object for the most specialized bean that specializes
+    * the bean which declares the observer method, and then
     * 
+    */
+   @Test(groups = { "events" })
+   @SpecAssertion(section = "7.5.8", id = "l")
+   public void testObserverCalledOnMostSpecializedInstance()
+   {
+      Shop.deliveryObservedBy = null;
+      getCurrentManager().fireEvent(new Delivery());
+      assert Shop.deliveryObservedBy.equals(FarmShop.class.getName());
+   }
+
+   /**
     * obtain the context object by calling Manager.getContext(), passing the
     * bean scope, then
-    * 
+    */
+   @Test(groups = { "stub", "events" })
+   @SpecAssertion(section = "7.5.8", id = "m")
+   public void testObserverContextRetrieved()
+   {
+      assert false;
+   }
+
+   /**
     * obtain an instance of the bean by calling Context.get(), passing the Bean
     * instance representing the bean, together with a CreationalContext unless
     * this observer method is a conditional observer method, and then
-    * 
-    * if the get() method returned a non-null value, invoke the observer method
-    * on the returned instance
     */
    @Test(groups = { "stub", "events" })
-   @SpecAssertion(section = "7.5.8", id = "j")
-   public void testObserverMethodInvocationProcess()
+   @SpecAssertion(section = "7.5.8", id = "n")
+   public void testObserverInstanceRetrievedFromContext()
    {
       assert false;
    }
 
    /**
-    * Otherwise, if the observer method is non-static, the container must:
-    * 
-    * • obtain the Bean object for the most specialized bean that specializes
-    * the bean which declares the observer method, and then
-    * 
+    * if the get() method returned a non-null value, invoke the observer method
+    * on the returned instance
     */
-   @Test(groups = { "events" })
-   @SpecAssertion(section = "7.5.8", id = "j")
-   public void testObserverCalledOnMostSpecializedInstance()
+   @Test(groups = { "stub", "events" })
+   @SpecAssertion(section = "7.5.8", id = "o")
+   public void testObserverMethodInvokedOnReturnedInstanceFromContext()
    {
-      Shop.deliveryObservedBy = null;
-      getCurrentManager().fireEvent(new Delivery());
-      assert Shop.deliveryObservedBy.equals(FarmShop.class.getName());
+      assert false;
    }
 
    @Test(groups = { "stub", "events" })
@@ -681,7 +691,7 @@
    }
 
    @Test(groups = { "events", "underInvestigation" })
-   @SpecAssertion(section = "7.6", id = "u")
+   @SpecAssertions( { @SpecAssertion(section = "7.5.8", id = "s"), @SpecAssertion(section = "7.6", id = "u")} )
    public void testObserverMethodCallsManagerAddObserverWithObserverObject()
    {
       assert false;

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-26 16:14:07 UTC (rev 1722)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-26 19:16:58 UTC (rev 1723)
@@ -3905,50 +3905,58 @@
     </assertion>
     
     <assertion id="b">
-      <text>The notify() method of the Observer implementation for an observer method either invokes the observer method immediately, or asynchronously, or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization</text>
+      <text>The notify() method of the Observer implementation for an observer method either invokes the observer method ~immediately~, or asynchronously, or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization</text>
     </assertion>
     
     <assertion id="c">
-      <text>If the observer method is an asynchronous transactional observer method and there is currently a JTA transaction in progress, the observer object calls the observer method asynchronously during the after transaction completion phase</text>
+      <text>The notify() method of the Observer implementation for an observer method either invokes the observer method immediately, ~or asynchronously~, or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization</text>
     </assertion>
     
     <assertion id="d">
-      <text>If the observer method is a transactional observer method and there is currently a JTA transaction in progress, the observer object calls the observer method during the appropriate transaction completion phase</text>
+      <text>The notify() method of the Observer implementation for an observer method either invokes the observer method immediately, or asynchronously, ~or registers the observer method for later invocation during the transaction completion phase, using a JTA Synchronization~</text>
     </assertion>
     
     <assertion id="e">
-      <text>If the observer method is an asynchronous observer method, the container calls the observer method asynchronously</text>
+      <text>If the observer method is an asynchronous transactional observer method and there is currently a JTA transaction in progress, the observer object calls the observer method asynchronously during the after transaction completion phase</text>
     </assertion>
     
     <assertion id="f">
-      <text>If none of the conditions of assertions c, d, or e are true, the container calls the observer immediately</text>
+      <text>If the observer method is a transactional observer method and there is currently a JTA transaction in progress, the observer object calls the observer method during the appropriate transaction completion phase</text>
     </assertion>
     
     <assertion id="g">
+      <text>If the observer method is an asynchronous observer method, the container calls the observer method asynchronously</text>
+    </assertion>
+    
+    <assertion id="h">
+      <text>If none of the conditions of assertions e, f, or g are true, the container calls the observer immediately</text>
+    </assertion>
+    
+    <assertion id="i">
       <text>The container is not required to guarantee delivery of asynchronous events in the case of a server shutdown or failure</text>
     </assertion>
     
-    <assertion id="h">
+    <assertion id="j">
       <text>To invoke an observer method, the container must pass the event object to the event parameter and the object returned by Manager.getInstanceToInject() to each of the other parameters</text>
     </assertion>
     
-    <assertion id="i">
+    <assertion id="k">
       <text>If the observer method is static, the container must invoke the method</text>
     </assertion>
     
-    <assertion id="j">
+    <assertion id="l">
       <text>If the observer method is non-static, the container must obtain the Bean object for the most specialized bean that specializes the bean which declares the observer method</text>
     </assertion>
     
-    <assertion id="k">
+    <assertion id="m">
       <text>Placeholder for path 2</text>
     </assertion>
     
-    <assertion id="l">
+    <assertion id="n">
       <text>Placeholder for path 3</text>
     </assertion>
     
-    <assertion id="m">
+    <assertion id="o">
       <text>Placeholder for path 4 etc</text>
     </assertion>
     




More information about the weld-commits mailing list