[webbeans-commits] Webbeans SVN: r2292 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Apr 1 11:04:36 EDT 2009


Author: dallen6
Date: 2009-04-01 11:04:36 -0400 (Wed, 01 Apr 2009)
New Revision: 2292

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer.java
Log:
A couple producer method tests now working.

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java	2009-04-01 14:07:15 UTC (rev 2291)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/ProducerMethodLifecycleTest.java	2009-04-01 15:04:36 UTC (rev 2292)
@@ -19,7 +19,7 @@
 public class ProducerMethodLifecycleTest extends AbstractJSR299Test
 {
 
-   @Test(groups = { "producerMethod", "disposalMethod", "ri-broken" })
+   @Test(groups = { "producerMethod", "disposalMethod" })
    @SpecAssertions({
       @SpecAssertion(section = "6", id = "f")
    })
@@ -41,5 +41,23 @@
       }.run();
    }
 
+   @Test(groups = { "producerMethod" })
+   @SpecAssertions({
+      @SpecAssertion(section = "6", id = "b")
+   })
+   public void testProducerMethodBeanCreate() throws Exception
+   {
+      new RunInDependentContext()
+      {
 
+         @Override
+         protected void execute() throws Exception
+         {
+            getCurrentManager().getInstanceByType(Tarantula.class);
+            assert SpiderProducer.isTarantulaCreated();
+         }
+         
+      }.run();
+   }
+
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer.java	2009-04-01 14:07:15 UTC (rev 2291)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/method/lifecycle/SpiderProducer.java	2009-04-01 15:04:36 UTC (rev 2292)
@@ -6,10 +6,12 @@
 @AnotherDeploymentType
 class SpiderProducer
 {
+   private static boolean tarantulaCreated;
    private static boolean tarantulaDestroyed;
    
    @Produces public Tarantula produceTarantula()
    {
+      tarantulaCreated = true;
       return new Tarantula("Pete");
    }
    
@@ -23,11 +25,21 @@
       tarantulaDestroyed = true;
    }
 
+   public static boolean isTarantulaCreated()
+   {
+      return tarantulaCreated;
+   }
+
    public static boolean isTarantulaDestroyed()
    {
       return tarantulaDestroyed;
    }
 
+   public static void setTarantulaCreated(boolean tarantulaCreated)
+   {
+      SpiderProducer.tarantulaCreated = tarantulaCreated;
+   }
+
    public static void setTarantulaDestroyed(boolean tarantulaDestroyed)
    {
       SpiderProducer.tarantulaDestroyed = tarantulaDestroyed;




More information about the weld-commits mailing list