[webbeans-commits] Webbeans SVN: r1230 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Jan 25 14:11:28 EST 2009


Author: dallen6
Date: 2009-01-25 14:11:28 -0500 (Sun, 25 Jan 2009)
New Revision: 1230

Added:
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/HighestDeploymentType.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java
Modified:
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/BlackWidow.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/TarantulaProducer.java
Log:
Completed all producer field lifecycle tests and fixed some others.

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/BlackWidow.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/BlackWidow.java	2009-01-25 14:46:28 UTC (rev 1229)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/BlackWidow.java	2009-01-25 19:11:28 UTC (rev 1230)
@@ -2,5 +2,9 @@
 
 class BlackWidow extends Spider implements DeadlySpider
 {
-
+   public void bite()
+   {
+      // Test method used for proxy instances to force
+      // creation of the instance.
+   }
 }

Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/HighestDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/HighestDeploymentType.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/HighestDeploymentType.java	2009-01-25 19:11:28 UTC (rev 1230)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.unit.implementation.producer.field;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.DeploymentType;
+
+ at Target( { TYPE, METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at DeploymentType
+ at interface HighestDeploymentType
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/HighestDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java	2009-01-25 14:46:28 UTC (rev 1229)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java	2009-01-25 19:11:28 UTC (rev 1230)
@@ -22,8 +22,9 @@
 public class ProducerFieldDefinitionTest extends AbstractTest
 {
 
-
-   /* (non-Javadoc)
+   /*
+    * (non-Javadoc)
+    * 
     * @see org.jboss.webbeans.tck.AbstractTest#getEnabledDeploymentTypes()
     */
    @SuppressWarnings("unchecked")
@@ -46,15 +47,9 @@
    public void testProducerFieldInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
    {
       deployBeans(TarantulaProducer.class, TarantulaConsumer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
-            assert !tarantulaBeans.isEmpty();
-            assert tarantulaBeans.iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
-         }
-      }.run();
+      Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
+      assert !tarantulaBeans.isEmpty();
+      assert tarantulaBeans.iterator().next().getDeploymentType().equals(AnotherDeploymentType.class);
    }
 
    /*
@@ -114,27 +109,24 @@
       deployBeans(SpiderProducerWildCardType_Broken.class);
    }
 
-   @Test(groups = { "stub", "producerField", "deployment" })
+   /**
+    * A bean may declare multiple producer fields.
+    */
+   @Test(groups = { "producerField", "deployment" })
    @SpecAssertion(section = "3.5")
    public void testBeanDeclaresMultipleProducerFields()
    {
-      assert false;
+      deployBeans(OtherSpiderProducer.class);
    }
 
    @Test(groups = "producerField")
    @SpecAssertion(section = { "3.5", "2.3.1" })
-   public void testDefaultBindingType() throws Exception
+   public void testDefaultBindingType()
    {
       deployBeans(StaticTarantulaProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
-            assert !tarantulaBeans.isEmpty();
-            assert tarantulaBeans.iterator().next().getBindings().contains(new CurrentBinding());
-         }
-      }.run();
+      Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
+      assert !tarantulaBeans.isEmpty();
+      assert tarantulaBeans.iterator().next().getBindings().contains(new CurrentBinding());
    }
 
    /**
@@ -146,25 +138,19 @@
     */
    @Test(groups = "producerField")
    @SpecAssertion(section = "3.5.1")
-   public void testApiTypeForClassReturn() throws Exception
+   public void testApiTypeForClassReturn()
    {
       deployBeans(StaticTarantulaProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
-            assert !tarantulaBeans.isEmpty();
-            Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
-            assert tarantulaModel.getTypes().size() == 6;
-            assert tarantulaModel.getTypes().contains(Tarantula.class);
-            assert tarantulaModel.getTypes().contains(DeadlySpider.class);
-            assert tarantulaModel.getTypes().contains(Spider.class);
-            assert tarantulaModel.getTypes().contains(Animal.class);
-            assert tarantulaModel.getTypes().contains(DeadlyAnimal.class);
-            assert tarantulaModel.getTypes().contains(Object.class);
-         }
-      }.run();
+      Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
+      assert !tarantulaBeans.isEmpty();
+      Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+      assert tarantulaModel.getTypes().size() == 6;
+      assert tarantulaModel.getTypes().contains(Tarantula.class);
+      assert tarantulaModel.getTypes().contains(DeadlySpider.class);
+      assert tarantulaModel.getTypes().contains(Spider.class);
+      assert tarantulaModel.getTypes().contains(Animal.class);
+      assert tarantulaModel.getTypes().contains(DeadlyAnimal.class);
+      assert tarantulaModel.getTypes().contains(Object.class);
    }
 
    /**
@@ -176,21 +162,15 @@
     */
    @Test(groups = { "producerField" })
    @SpecAssertion(section = "3.5.1")
-   public void testApiTypeForInterfaceReturn() throws Exception
+   public void testApiTypeForInterfaceReturn()
    {
       deployBeans(SpiderAsAnimalProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Animal>> animalBeans = manager.resolveByType(Animal.class);
-            assert !animalBeans.isEmpty();
-            Bean<Animal> animalModel = animalBeans.iterator().next();
-            assert animalModel.getTypes().size() == 2;
-            assert animalModel.getTypes().contains(Animal.class);
-            assert animalModel.getTypes().contains(Object.class);
-         }
-      }.run();
+      Set<Bean<Animal>> animalBeans = manager.resolveByType(Animal.class);
+      assert !animalBeans.isEmpty();
+      Bean<Animal> animalModel = animalBeans.iterator().next();
+      assert animalModel.getTypes().size() == 2;
+      assert animalModel.getTypes().contains(Animal.class);
+      assert animalModel.getTypes().contains(Object.class);
    }
 
    /**
@@ -201,21 +181,15 @@
     */
    @Test(groups = { "producerField" })
    @SpecAssertion(section = "3.5.1")
-   public void testApiTypeForPrimitiveReturn() throws Exception
+   public void testApiTypeForPrimitiveReturn()
    {
       deployBeans(OtherSpiderProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<?>> beans = manager.resolveByName("SpiderSize");
-            assert !beans.isEmpty();
-            Bean<?> intModel = beans.iterator().next();
-            assert intModel.getTypes().size() == 2;
-            assert intModel.getTypes().contains(int.class);
-            assert intModel.getTypes().contains(Object.class);
-         }
-      }.run();
+      Set<Bean<?>> beans = manager.resolveByName("SpiderSize");
+      assert !beans.isEmpty();
+      Bean<?> intModel = beans.iterator().next();
+      assert intModel.getTypes().size() == 2;
+      assert intModel.getTypes().contains(int.class);
+      assert intModel.getTypes().contains(Object.class);
    }
 
    /**
@@ -226,21 +200,15 @@
     */
    @Test(groups = { "producerField" })
    @SpecAssertion(section = { "3.5.1", "2.2" })
-   public void testApiTypeForArrayTypeReturn() throws Exception
+   public void testApiTypeForArrayTypeReturn()
    {
       deployBeans(OtherSpiderProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Spider[]>> spidersModels = manager.resolveByType(Spider[].class);
-            assert !spidersModels.isEmpty();
-            Bean<Spider[]> spidersModel = spidersModels.iterator().next();
-            assert spidersModel.getTypes().size() == 2;
-            assert spidersModel.getTypes().contains(Spider[].class);
-            assert spidersModel.getTypes().contains(Object.class);
-         }
-      }.run();
+      Set<Bean<Spider[]>> spidersModels = manager.resolveByType(Spider[].class);
+      assert !spidersModels.isEmpty();
+      Bean<Spider[]> spidersModel = spidersModels.iterator().next();
+      assert spidersModel.getTypes().size() == 2;
+      assert spidersModel.getTypes().contains(Spider[].class);
+      assert spidersModel.getTypes().contains(Object.class);
    }
 
    /**
@@ -251,20 +219,14 @@
     */
    @Test(groups = "producerField")
    @SpecAssertion(section = "3.5.2")
-   public void testBindingType() throws Exception
+   public void testBindingType()
    {
       deployBeans(TameTarantulaProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class, new TameAnnotationLiteral());
-            assert !tarantulaBeans.isEmpty();
-            Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
-            assert tarantulaModel.getBindings().size() == 1;
-            assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
-         }
-      }.run();
+      Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class, new TameAnnotationLiteral());
+      assert !tarantulaBeans.isEmpty();
+      Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+      assert tarantulaModel.getBindings().size() == 1;
+      assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
    }
 
    /**
@@ -275,19 +237,13 @@
     */
    @Test(groups = "producerField")
    @SpecAssertion(section = "3.5.2")
-   public void testScopeType() throws Exception
+   public void testScopeType()
    {
       deployBeans(TameTarantulaProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class, new TameAnnotationLiteral());
-            assert !tarantulaBeans.isEmpty();
-            Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
-            assert tarantulaModel.getScopeType().equals(RequestScoped.class);
-         }
-      }.run();
+      Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class, new TameAnnotationLiteral());
+      assert !tarantulaBeans.isEmpty();
+      Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+      assert tarantulaModel.getScopeType().equals(RequestScoped.class);
 
       // TODO Inherit scope from returned web bean?
    }
@@ -300,19 +256,13 @@
     */
    @Test(groups = "producerField")
    @SpecAssertion(section = "3.5.2")
-   public void testDeploymentType() throws Exception
+   public void testDeploymentType()
    {
       deployBeans(TameTarantulaProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class, new TameAnnotationLiteral());
-            assert !tarantulaBeans.isEmpty();
-            Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
-            assert tarantulaModel.getDeploymentType().equals(Production.class);
-         }
-      }.run();
+      Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class, new TameAnnotationLiteral());
+      assert !tarantulaBeans.isEmpty();
+      Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+      assert tarantulaModel.getDeploymentType().equals(Production.class);
    }
 
    /**
@@ -323,21 +273,15 @@
     */
    @Test(groups = "producerField")
    @SpecAssertion(section = "3.5.2")
-   public void testNamedField() throws Exception
+   public void testNamedField()
    {
       deployBeans(BlackWidowProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<?>> beans = manager.resolveByName("blackWidow");
-            assert !beans.isEmpty();
+      Set<Bean<?>> beans = manager.resolveByName("blackWidow");
+      assert !beans.isEmpty();
 
-            @SuppressWarnings("unchecked")
-            Bean<BlackWidow> blackWidowModel = (Bean<BlackWidow>) beans.iterator().next();
-            assert blackWidowModel.getName().equals("blackWidow");
-         }
-      }.run();
+      @SuppressWarnings("unchecked")
+      Bean<BlackWidow> blackWidowModel = (Bean<BlackWidow>) beans.iterator().next();
+      assert blackWidowModel.getName().equals("blackWidow");
    }
 
    /**
@@ -347,89 +291,15 @@
     */
    @Test(groups = { "producerField" })
    @SpecAssertion(section = { "2.6.3", "3.5.4" })
-   public void testDefaultNamedField() throws Exception
+   public void testDefaultNamedField()
    {
       deployBeans(StaticTarantulaProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
-            assert !tarantulaBeans.isEmpty();
-            Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
-            assert tarantulaModel.getName().equals("produceTarantula");
-         }
-      }.run();
+      Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
+      assert !tarantulaBeans.isEmpty();
+      Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+      assert tarantulaModel.getName().equals("produceTarantula");
    }
 
-   @Test(groups = { "stub", "disposalField" })
-   @SpecAssertion(section = "3.3.5")
-   public void testDisposalFieldNonStatic()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-
-   @Test(groups = { "stub", "disposalField" })
-   @SpecAssertion(section = "3.3.5")
-   public void testDisposalFieldFieldDeclaredOnWebBeanImplementationClass()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-
-   @Test(groups = { "stub", "disposalField" })
-   @SpecAssertion(section = "3.3.5")
-   public void testDisposalFieldBindingAnnotations()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-
-   @Test(groups = { "stub", "disposalField" })
-   @SpecAssertion(section = "3.3.5")
-   public void testDisposalFieldDefaultBindingAnnotations()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-
-   @Test(groups = { "stub", "disposalField" })
-   @SpecAssertion(section = "3.3.5")
-   public void testDisposalFieldDoesNotResolveToProducerField()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-
-   @Test(groups = { "stub", "disposalField" })
-   @SpecAssertion(section = "3.3.5")
-   public void testDisposalFieldDeclaredOnEnabledBean()
-   {
-      // TODO Placeholder
-      // TODO Move this
-
-      assert false;
-   }
-
-   @Test(groups = { "stub", "disposalField" })
-   @SpecAssertion(section = "3.3.5")
-   public void testBeanCanDeclareMultipleDisposalFields()
-   {
-      // TODO move this
-      // TODO Placeholder
-      assert false;
-   }
-
-   @Test(groups = { "stub", "disposalField" })
-   @SpecAssertion(section = "3.3.5")
-   public void testProducerFieldHasNoMoreThanOneDisposalField()
-   {
-      // TODO move this
-      // TODO Placeholder
-      assert false;
-   }
-
    /**
     * A producer field may also specify scope, name, deployment type,
     * stereotypes and/or bindings.
@@ -438,20 +308,14 @@
     */
    @Test(groups = "producerField")
    @SpecAssertion(section = { "2.7.2", "3.5.2", "2.2" })
-   public void testStereotype() throws Exception
+   public void testStereotype()
    {
       deployBeans(StaticTarantulaProducer.class);
-      new RunInDependentContext()
-      {
-         public void execute()
-         {
-            Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
-            assert !tarantulaBeans.isEmpty();
-            Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
-            assert tarantulaModel.getScopeType().equals(RequestScoped.class);
-            assert tarantulaModel.getDeploymentType().equals(Production.class);
-         }
-      }.run();
+      Set<Bean<Tarantula>> tarantulaBeans = manager.resolveByType(Tarantula.class);
+      assert !tarantulaBeans.isEmpty();
+      Bean<Tarantula> tarantulaModel = tarantulaBeans.iterator().next();
+      assert tarantulaModel.getScopeType().equals(RequestScoped.class);
+      assert tarantulaModel.getDeploymentType().equals(Production.class);
    }
 
    @Test(groups = "producerField")

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java	2009-01-25 14:46:28 UTC (rev 1229)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/ProducerFieldLifecycleTest.java	2009-01-25 19:11:28 UTC (rev 1230)
@@ -1,6 +1,14 @@
 package org.jboss.webbeans.tck.unit.implementation.producer.field;
 
+import java.lang.annotation.Annotation;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
 import javax.webbeans.IllegalProductException;
+import javax.webbeans.Production;
+import javax.webbeans.Standard;
+
 import org.jboss.webbeans.tck.AbstractTest;
 import org.jboss.webbeans.tck.impl.SpecAssertion;
 import org.jboss.webbeans.tck.impl.SpecVersion;
@@ -9,6 +17,18 @@
 @SpecVersion("PRD2")
 public class ProducerFieldLifecycleTest extends AbstractTest
 {
+   /*
+    * (non-Javadoc)
+    * 
+    * @see org.jboss.webbeans.tck.AbstractTest#getEnabledDeploymentTypes()
+    */
+   @SuppressWarnings("unchecked")
+   @Override
+   protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
+   {
+      // Add a local deployment type used in tests
+      return Collections.unmodifiableList(Arrays.asList(Standard.class, Production.class, AnotherDeploymentType.class, HighestDeploymentType.class));
+   }
 
    /**
     * When the create() method of a Bean object that represents a producer field
@@ -72,12 +92,21 @@
       }.run();
    }
 
-   @Test(groups = { "stub", "specialization" })
-   @SpecAssertion(section = "3.3.3")
-   public void testSpecializedBeanAlwaysUsed()
+   @Test(groups = { "producerField", "specialization" })
+   @SpecAssertion(section = "6.8")
+   public void testSpecializedBeanAlwaysUsed() throws Exception
    {
-      // TODO Placeholder
-      assert false;
+      deployBeans(TarantulaProducer.class, SpecializedTarantulaProducer.class, TarantulaConsumer.class);
+      new RunInDependentContext()
+      {
+         @Override
+         protected void execute() throws Exception
+         {
+            TarantulaConsumer spiderConsumer = manager.getInstanceByType(TarantulaConsumer.class);
+            assert spiderConsumer.getConsumedTarantula() != null;
+            assert spiderConsumer.getConsumedTarantula() instanceof DefangedTarantula;
+         }
+      }.run();
    }
 
    /**
@@ -104,12 +133,12 @@
 
    /**
     * Otherwise, if the producer field contains a null value, and the scope of
-    * the producer method is not @Dependent, the cre- method throws an
-    * IllegalProductException. ate()
+    * the producer method is not @Dependent, the create() method throws an
+    * IllegalProductException. 
     * 
     * @throws Exception
     */
-   @Test(groups = { "producerField", "broken" }, expectedExceptions = IllegalProductException.class)
+   @Test(groups = { "producerField" }, expectedExceptions = IllegalProductException.class)
    @SpecAssertion(section = { "3.5", "6.8" })
    public void testProducerFieldReturnsNullIsNotDependent() throws Exception
    {
@@ -119,7 +148,20 @@
          @Override
          protected void execute() throws Exception
          {
-            manager.getInstanceByType(NullSpiderConsumer.class);
+            NullSpiderConsumer consumer = manager.getInstanceByType(NullSpiderConsumer.class);
+            // The injected spider is proxied since it is in the request scope.
+            // So to actually create the bean instance, we need to invoke
+            // some method on the proxy.
+            if (consumer.getInjectedSpider() == null)
+            {
+               // No proxy in this impl, and no exception = fail
+               assert false;
+            }
+            else
+            {
+               // Proxy is assumed, so invoke some method
+               consumer.getInjectedSpider().bite();
+            }
          }
       }.run();
    }

Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java	2009-01-25 19:11:28 UTC (rev 1230)
@@ -0,0 +1,36 @@
+/*
+ * 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.unit.implementation.producer.field;
+
+import javax.webbeans.Produces;
+import javax.webbeans.Specializes;
+
+/**
+ * This bean contains a producer field and specializes another bean
+ * which has the same producer field.
+ * 
+ * @author David Allen
+ *
+ */
+ at Specializes
+ at HighestDeploymentType
+public class SpecializedTarantulaProducer extends TarantulaProducer
+{
+   @Produces public Tarantula produceTarantula = new DefangedTarantula();
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/SpecializedTarantulaProducer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/TarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/TarantulaProducer.java	2009-01-25 14:46:28 UTC (rev 1229)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/implementation/producer/field/TarantulaProducer.java	2009-01-25 19:11:28 UTC (rev 1230)
@@ -5,6 +5,6 @@
 @AnotherDeploymentType
 public class TarantulaProducer
 {
-   @Produces public Tarantula produceTarantula = new DefangedTarantula();
+   @Produces public Tarantula produceTarantula = new Tarantula();
 
 }




More information about the weld-commits mailing list