[webbeans-commits] Webbeans SVN: r1567 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Feb 18 08:07:18 EST 2009


Author: shane.bryzak at jboss.com
Date: 2009-02-18 08:07:18 -0500 (Wed, 18 Feb 2009)
New Revision: 1567

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java
Log:
mapped context tests to assertions

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java	2009-02-18 10:53:32 UTC (rev 1566)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java	2009-02-18 13:07:18 UTC (rev 1567)
@@ -95,7 +95,7 @@
     * method call, including invocation of EJB local business methods.
     */
    @Test(groups = { "stub", "contexts", "underInvestigation" })
-   @SpecAssertion(section = "8.5", id = "unknown")
+   @SpecAssertion(section = "8.5", id = "b")
    public void testBuiltInNormalScopedContextsPropagateAcrossAnyJavaMethodCall()
    {
       assert false;

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java	2009-02-18 10:53:32 UTC (rev 1566)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/NormalContextTest.java	2009-02-18 13:07:18 UTC (rev 1567)
@@ -36,11 +36,8 @@
       getCurrentManager().addContext(context);
    }
 
-   /**
-    * return an existing instance of the given contextual type, or
-    */
    @Test(groups = { "contexts", "broken" })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "a")
    public void testGetReturnsExistingInstance()
    {
       deployBeans(MySessionBean.class);
@@ -53,11 +50,8 @@
       assert beanInstanceFromGet == beanInstance;
    }
 
-   /**
-    * if no CreationalContext is given, return a null value, or
-    */
    @Test(groups = { "contexts" })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "b")
    public void testGetWithoutCreationalContextReturnsNull()
    {
       deployBeans(MySessionBean.class);
@@ -66,13 +60,8 @@
       assert getCurrentManager().getContext(SessionScoped.class).get(mySessionBean) == null;
    }
 
-   /**
-    * if a CreationalContext is given, create a new instance of the given
-    * contextual type by calling Contextual.create() and return the new
-    * instance.
-    */
    @Test(groups = { "contexts" })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "c")
    public void testGetWithCreationalContextReturnsNewInstance()
    {
       deployBeans();
@@ -85,12 +74,8 @@
       assert bean.isCreateCalled();
    }
 
-   /**
-    * The get() method may not return a null value unless no CreationalContext
-    * is given, or Contextual.create() returns a null value.
-    */
    @Test(groups = { "contexts" })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "d")
    public void testGetMayNotReturnNullUnlessNoCreationalContextOrContextualCreateReturnsNull()
    {
       // The case of no creational context is already tested where a null is
@@ -104,12 +89,8 @@
       assert bean.isCreateCalled();
    }
 
-   /**
-    * The get() method may not create a new instance of the given contextual
-    * type unless a CreationalContext is given.
-    */
    @Test(groups = { "contexts" })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "e")
    public void testGetMayNotCreateNewInstanceUnlessCreationalContextGiven()
    {
       deployBeans(MySessionBean.class, MyApplicationBean.class);
@@ -128,13 +109,8 @@
       assert getCurrentManager().getContext(ApplicationScoped.class).get(myApplicationBean, myOtherCreationalContext) != null;
    }
 
-   /**
-    * The Context implementation is responsible for destroying any contextual
-    * instance it creates by passing the instance to the destroy() method of the
-    * Contextual object representing the contextual type.
-    */
    @Test(groups = { "contexts" })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "f")
    public void testContextDestroysBeansWhenDestroyed()
    {
       MyContextual bean = new MyContextual(getCurrentManager());
@@ -150,12 +126,8 @@
       assert bean.isDestroyCalled();
    }
 
-   /**
-    * A destroyed instance must not subsequently be returned by the get()
-    * method.
-    */
    @Test(groups = { "contexts", "broken" })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "g")
    public void testDestroyedInstanceMustNotBeReturnedByGet()
    {
       deployBeans(MySessionBean.class, MyApplicationBean.class);
@@ -178,13 +150,8 @@
       assert myApplicationBeanInstance != mySecondApplicationBeanInstance;
    }
 
-   /**
-    * When a scope is inactive, any invocation of the get() from the current
-    * thread upon the Context object for that scope results in a
-    * ContextNotActiveException.
-    */
    @Test(groups = { "contexts" }, expectedExceptions = { ContextNotActiveException.class })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "h")
    public void testInvokingGetOnInactiveContextFails()
    {
       deployBeans(MySessionBean.class);
@@ -201,7 +168,7 @@
     * thread
     */
    @Test(groups = { "contexts", "stub", "underInvestigation" })
-   @SpecAssertion(section = "8.1", id = "unknown")
+   @SpecAssertion(section = "8.1", id = "review")
    public void testOnlyOneMappedInstancePerContextualTypePerThread()
    {
       assert false;




More information about the weld-commits mailing list