[weld-commits] Weld SVN: r6903 - in core/trunk: tests-arquillian/src/test/java/org/jboss/weld/tests/extensions and 1 other directory.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Aug 4 13:08:06 EDT 2010


Author: pete.muir at jboss.org
Date: 2010-08-04 13:08:05 -0400 (Wed, 04 Aug 2010)
New Revision: 6903

Added:
   core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/EnterpriseExtensionTest.java
Modified:
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessProducerBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessBeanInjectionTarget.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerFieldImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerMethodImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSimpleInjectionTarget.java
   core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionObserver.java
   core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java
   core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/Foo.java
Log:
standardize parameter type names, WELD-572

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessProducerBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessProducerBean.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessProducerBean.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -24,7 +24,7 @@
 import org.jboss.weld.bean.AbstractProducerBean;
 import org.jboss.weld.manager.BeanManagerImpl;
 
-public abstract class AbstractProcessProducerBean<X, T, B extends AbstractProducerBean<X, T, ? >> extends AbstractDefinitionContainerEvent implements ProcessBean<T>
+public abstract class AbstractProcessProducerBean<T, X, B extends AbstractProducerBean<T, X, ? >> extends AbstractDefinitionContainerEvent implements ProcessBean<X>
 {
 
    private final B bean;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessBeanInjectionTarget.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessBeanInjectionTarget.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessBeanInjectionTarget.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -23,23 +23,23 @@
 import org.jboss.weld.manager.BeanManagerImpl;
 
 
-public class ProcessBeanInjectionTarget<T> extends AbstractProcessInjectionTarget<T> implements ProcessInjectionTarget<T>
+public class ProcessBeanInjectionTarget<X> extends AbstractProcessInjectionTarget<X> implements ProcessInjectionTarget<X>
 {
    
-   private final AbstractClassBean<T> classBean;
+   private final AbstractClassBean<X> classBean;
 
-   public ProcessBeanInjectionTarget(BeanManagerImpl beanManager, AbstractClassBean<T> bean)
+   public ProcessBeanInjectionTarget(BeanManagerImpl beanManager, AbstractClassBean<X> bean)
    {
       super(beanManager, bean.getWeldAnnotated());
       this.classBean = bean;
    }
 
-   public InjectionTarget<T> getInjectionTarget()
+   public InjectionTarget<X> getInjectionTarget()
    {
       return classBean.getInjectionTarget();
    }
 
-   public void setInjectionTarget(InjectionTarget<T> injectionTarget)
+   public void setInjectionTarget(InjectionTarget<X> injectionTarget)
    {
       classBean.setInjectionTarget(injectionTarget);
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerFieldImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerFieldImpl.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerFieldImpl.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -24,23 +24,30 @@
 import org.jboss.weld.bean.ProducerField;
 import org.jboss.weld.manager.BeanManagerImpl;
 
-public class ProcessProducerFieldImpl<X, T> extends AbstractProcessProducerBean<X, T, ProducerField<X, T>> implements ProcessProducerField<X, T>
+public class ProcessProducerFieldImpl<T, X> extends AbstractProcessProducerBean<T, X, ProducerField<T, X>> implements ProcessProducerField<T, X>
 {
 
-   
-   public static <X, T> void fire(BeanManagerImpl beanManager, ProducerField<X, T> bean)
+   public static <T, X> void fire(BeanManagerImpl beanManager, ProducerField<T, X> bean)
    {
-      new ProcessProducerFieldImpl<X, T>(beanManager, bean) {}.fire();
+      new ProcessProducerFieldImpl<T, X>(beanManager, bean) {}.fire();
    }
    
-   public ProcessProducerFieldImpl(BeanManagerImpl beanManager, ProducerField<X, T> bean)
+   public ProcessProducerFieldImpl(BeanManagerImpl beanManager, ProducerField<T, X> bean)
    {
       super(beanManager, ProcessProducerField.class, new Type[] { bean.getWeldAnnotated().getDeclaringType().getBaseType(), bean.getWeldAnnotated().getBaseType() }, bean);
    }
 
-   public AnnotatedField<X> getAnnotatedProducerField()
+   @SuppressWarnings("unchecked")
+   public AnnotatedField<T> getAnnotatedProducerField()
    {
-      return (AnnotatedField<X>) getBean().getWeldAnnotated();
+      if (getBean().getWeldAnnotated() != null)
+      {
+         return (AnnotatedField<T>) getBean().getWeldAnnotated();
+      }
+      else
+      {
+         return null;
+      }
    }
 
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerImpl.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerImpl.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -27,18 +27,19 @@
 import org.jboss.weld.manager.BeanManagerImpl;
 
 
-public class ProcessProducerImpl<X, T> extends AbstractDefinitionContainerEvent implements ProcessProducer<X, T>
+public class ProcessProducerImpl<T, X> extends AbstractDefinitionContainerEvent implements ProcessProducer<T, X>
 {
    
-   public static <X, T> void fire(BeanManagerImpl beanManager, AbstractProducerBean<X, T, Member> producer)
+   @SuppressWarnings("unchecked")
+   public static <T, X> void fire(BeanManagerImpl beanManager, AbstractProducerBean<T, X, Member> producer)
    {
-      new ProcessProducerImpl<X, T>(beanManager, (AnnotatedMember<X>) producer.getWeldAnnotated(), producer) {}.fire();
+      new ProcessProducerImpl<T, X>(beanManager, (AnnotatedMember<T>) producer.getWeldAnnotated(), producer) {}.fire();
    }
    
-   private final AnnotatedMember<X> annotatedMember;
-   private AbstractProducerBean<X, T, ?> bean;
+   private final AnnotatedMember<T> annotatedMember;
+   private AbstractProducerBean<T, X, ?> bean;
 
-   public ProcessProducerImpl(BeanManagerImpl beanManager, AnnotatedMember<X> annotatedMember, AbstractProducerBean<X, T, ?> bean)
+   public ProcessProducerImpl(BeanManagerImpl beanManager, AnnotatedMember<T> annotatedMember, AbstractProducerBean<T, X, ?> bean)
    {
       super(beanManager, ProcessProducer.class, new Type[] { bean.getWeldAnnotated().getDeclaringType().getBaseType(), bean.getWeldAnnotated().getBaseType() });
       this.bean = bean;
@@ -50,17 +51,17 @@
       getErrors().add(t);
    }
 
-   public AnnotatedMember<X> getAnnotatedMember()
+   public AnnotatedMember<T> getAnnotatedMember()
    {
       return annotatedMember;
    }
 
-   public Producer<T> getProducer()
+   public Producer<X> getProducer()
    {
       return bean.getProducer();
    }
 
-   public void setProducer(Producer<T> producer)
+   public void setProducer(Producer<X> producer)
    {
       this.bean.setProducer(producer);
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerMethodImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerMethodImpl.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerMethodImpl.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -25,28 +25,44 @@
 import org.jboss.weld.bean.ProducerMethod;
 import org.jboss.weld.manager.BeanManagerImpl;
 
-public class ProcessProducerMethodImpl<X, T> extends AbstractProcessProducerBean<X, T, ProducerMethod<X, T>> implements ProcessProducerMethod<X, T>
+public class ProcessProducerMethodImpl<T, X> extends AbstractProcessProducerBean<T, X, ProducerMethod<T, X>> implements ProcessProducerMethod<T, X>
 {
    
    
-   public static <X, T> void fire(BeanManagerImpl beanManager, ProducerMethod<X, T> bean)
+   public static <T, X> void fire(BeanManagerImpl beanManager, ProducerMethod<T, X> bean)
    {
-      new ProcessProducerMethodImpl<X, T>(beanManager, bean) {}.fire();
+      new ProcessProducerMethodImpl<T, X>(beanManager, bean) {}.fire();
    }
 
-   public ProcessProducerMethodImpl(BeanManagerImpl beanManager, ProducerMethod<X, T> bean)
+   public ProcessProducerMethodImpl(BeanManagerImpl beanManager, ProducerMethod<T, X> bean)
    {
       super(beanManager, ProcessProducerMethod.class, new Type[] { bean.getWeldAnnotated().getDeclaringType().getBaseType(), bean.getWeldAnnotated().getBaseType() }, bean);
    }
 
-   public AnnotatedParameter<X> getAnnotatedDisposedParameter()
+   @SuppressWarnings("unchecked")
+   public AnnotatedParameter<T> getAnnotatedDisposedParameter()
    {
-      return (AnnotatedParameter<X>) getBean().getDisposalMethod().getDisposesParameter();
+      if (getBean().getDisposalMethod() != null)
+      {
+         return (AnnotatedParameter<T>) getBean().getDisposalMethod().getDisposesParameter();
+      }
+      else
+      {
+         return null;
+      }
    }
 
-   public AnnotatedMethod<X> getAnnotatedProducerMethod()
+   @SuppressWarnings("unchecked")
+   public AnnotatedMethod<T> getAnnotatedProducerMethod()
    {
-      return (AnnotatedMethod<X>) getBean().getWeldAnnotated();
+      if (getBean().getWeldAnnotated() != null)
+      {
+         return (AnnotatedMethod<T>) getBean().getWeldAnnotated();
+      }
+      else
+      {
+         return null;
+      }
    }
 
    

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSimpleInjectionTarget.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSimpleInjectionTarget.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSimpleInjectionTarget.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -23,23 +23,23 @@
 import org.jboss.weld.manager.BeanManagerImpl;
 
 
-public class ProcessSimpleInjectionTarget<T> extends AbstractProcessInjectionTarget<T> implements ProcessInjectionTarget<T>
+public class ProcessSimpleInjectionTarget<X> extends AbstractProcessInjectionTarget<X> implements ProcessInjectionTarget<X>
 {
    
-   private InjectionTarget<T> injectionTarget;
+   private InjectionTarget<X> injectionTarget;
 
-   public ProcessSimpleInjectionTarget(BeanManagerImpl beanManager, AnnotatedType<T> annotatedType, InjectionTarget<T> injectionTarget)
+   public ProcessSimpleInjectionTarget(BeanManagerImpl beanManager, AnnotatedType<X> annotatedType, InjectionTarget<X> injectionTarget)
    {
       super(beanManager, annotatedType);
       this.injectionTarget = injectionTarget;
    }
 
-   public InjectionTarget<T> getInjectionTarget()
+   public InjectionTarget<X> getInjectionTarget()
    {
       return injectionTarget;
    }
 
-   public void setInjectionTarget(InjectionTarget<T> injectionTarget)
+   public void setInjectionTarget(InjectionTarget<X> injectionTarget)
    {
       this.injectionTarget = injectionTarget;
    }

Copied: core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/EnterpriseExtensionTest.java (from rev 6897, core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java)
===================================================================
--- core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/EnterpriseExtensionTest.java	                        (rev 0)
+++ core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/EnterpriseExtensionTest.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.weld.tests.extensions;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import javax.enterprise.inject.spi.Extension;
+
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.BeanArchive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.weld.tests.category.Integration;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+
+ at Category(Integration.class)
+ at RunWith(Arquillian.class)
+public class EnterpriseExtensionTest 
+{
+   @Deployment
+   public static Archive<?> deploy() 
+   {
+      return ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
+         .addModule(
+               ShrinkWrap.create(BeanArchive.class)
+                  .addPackage(EnterpriseExtensionTest.class.getPackage())
+                  .addServiceProvider(Extension.class, 
+                        SimpleExtension.class, 
+                        ExtensionObserver.class,
+                        WoodlandExtension.class)
+         );
+   }
+   
+   /*
+    * description = "WELD-243"
+    */
+   @Test
+   public void testContainerEventsOnlySentToExtensionBeans(ExtensionObserver extensionObserver, OtherObserver otherObserver)
+   {
+      assertTrue(extensionObserver.isBeforeBeanDiscovery());
+      assertTrue(extensionObserver.isAllBeforeBeanDiscovery());
+      assertFalse(otherObserver.isBeforeBeanDiscovery());
+      assertFalse(otherObserver.isAllBeforeBeanDiscovery());
+      
+      assertTrue(extensionObserver.isAfterBeanDiscovery());
+      assertTrue(extensionObserver.isAllAfterBeanDiscovery());
+      assertFalse(otherObserver.isAfterBeanDiscovery());
+      assertFalse(otherObserver.isAllAfterBeanDiscovery());
+      
+      assertTrue(extensionObserver.isProcessAnnotatedType());
+      assertTrue(extensionObserver.isAllProcessAnnnotatedType());
+      assertFalse(otherObserver.isProcessAnnotatedType());
+      assertFalse(otherObserver.isAllProcessAnnotatedType());
+      
+      assertTrue(extensionObserver.isProcessBean());
+      assertTrue(extensionObserver.isAllProcessBean());
+      assertFalse(otherObserver.isProcessBean());
+      assertFalse(otherObserver.isAllProcessBean());
+      
+      assertTrue(extensionObserver.isProcessInjectionTarget());
+      assertTrue(extensionObserver.isAllProcessInjectionTarget());
+      assertFalse(otherObserver.isProcessInjectionTarget());
+      assertFalse(otherObserver.isAllProcessInjectionTarget());
+      
+      assertTrue(extensionObserver.isProcessManagedBean());
+      assertTrue(extensionObserver.isAllProcessManagedBean());
+      assertFalse(otherObserver.isProcessManagedBean());
+      assertFalse(otherObserver.isAllProcessManagedBean());
+      
+      assertTrue(extensionObserver.isProcessObserverMethod());
+      assertTrue(extensionObserver.isAllProcessObserverMethod());
+      assertFalse(otherObserver.isProcessObserverMethod());
+      assertFalse(otherObserver.isAllProcessObserverMethod());
+      
+      assertTrue(extensionObserver.isProcessProducer());
+      assertTrue(extensionObserver.isAllProcessProducer());
+      assertFalse(otherObserver.isProcessProducer());
+      assertFalse(otherObserver.isAllProcessProducer());
+      
+      assertTrue(extensionObserver.isProcessProducerField());
+      assertTrue(extensionObserver.isAllProcessProducerField());
+      assertFalse(otherObserver.isProcessProducerField());
+      assertFalse(otherObserver.isAllProcessProducerField());
+      
+      assertTrue(extensionObserver.isProcessProducerMethod());
+      assertTrue(extensionObserver.isAllProcessProducerField());
+      assertFalse(otherObserver.isProcessProducerMethod());
+      assertFalse(otherObserver.isAllProcessProducerMethod());
+      
+      assertTrue(extensionObserver.isProcessSessionBean());
+      assertTrue(extensionObserver.isAllProcessSessionBean());
+      assertFalse(otherObserver.isProcessSessionBean());
+      assertFalse(otherObserver.isAllProcessSessionBean());
+      
+      assertTrue(extensionObserver.isAfterDeploymentValidation());
+      assertTrue(extensionObserver.isAllAfterDeploymentValidation());
+      assertFalse(otherObserver.isAfterDeploymentValidation());
+      assertFalse(otherObserver.isAllAfterDeploymentValidation());
+   }
+
+}

Modified: core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionObserver.java
===================================================================
--- core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionObserver.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionObserver.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -59,6 +59,8 @@
    private boolean processProducerMethod;
    private boolean processSessionBean;
    private boolean processAnnotatedType;
+   
+   private ProcessProducerMethod<?, ?> processProducerMethodInstance;
 
    public void observeAll(@Observes Object event)
    {
@@ -145,6 +147,7 @@
    public void observeProcessProducerMethod(@Observes ProcessProducerMethod<?, ?> event)
    {
       processProducerMethod = true;
+      this.processProducerMethodInstance = event;
    }
    
    public void observeProcessProducerField(@Observes ProcessProducerField<?, ?> event)
@@ -281,6 +284,11 @@
    {
       return processProducerMethod;
    }
+   
+   public ProcessProducerMethod<?, ?> getProcessProducerMethodInstance()
+   {
+      return processProducerMethodInstance;
+   }
 
    public boolean isProcessSessionBean()
    {

Modified: core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java
===================================================================
--- core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/ExtensionTest.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -16,6 +16,9 @@
  */
 package org.jboss.weld.tests.extensions;
 
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 import javax.enterprise.inject.spi.Extension;
 
 import org.jboss.arquillian.api.Deployment;
@@ -23,114 +26,48 @@
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.BeanArchive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
-import org.jboss.weld.tests.category.Integration;
-import org.junit.Assert;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 
- at Category(Integration.class)
 @RunWith(Arquillian.class)
 public class ExtensionTest 
 {
    @Deployment
    public static Archive<?> deploy() 
    {
-      return ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
-         .addModule(
-               ShrinkWrap.create(BeanArchive.class)
-                  .addPackage(ExtensionTest.class.getPackage())
-                  .addServiceProvider(Extension.class, 
-                        SimpleExtension.class, 
-                        ExtensionObserver.class,
-                        WoodlandExtension.class)
-         );
+      return ShrinkWrap.create(BeanArchive.class)
+               .addPackage(ExtensionTest.class.getPackage())
+               .addServiceProvider(Extension.class, 
+                     SimpleExtension.class, 
+                     ExtensionObserver.class,
+                     WoodlandExtension.class);
    }
 
    /*
     * description = "WELD-234"
     */
-   @Test
+   @Test 
    public void testExtensionInjectableAsBean(SimpleExtension extension)
    {
-      Assert.assertTrue(extension.isObservedBeforeBeanDiscovery());
+      assertTrue(extension.isObservedBeforeBeanDiscovery());
    }
    
    /*
-    * description = "WELD-243"
+    * description = "WELD-572"
     */
    @Test
-   public void testContainerEventsOnlySentToExtensionBeans(ExtensionObserver extensionObserver, OtherObserver otherObserver)
+   public void testGetNonExistentDisposalMethod(ExtensionObserver extensionObserver)
    {
-      Assert.assertTrue(extensionObserver.isBeforeBeanDiscovery());
-      Assert.assertTrue(extensionObserver.isAllBeforeBeanDiscovery());
-      Assert.assertFalse(otherObserver.isBeforeBeanDiscovery());
-      Assert.assertFalse(otherObserver.isAllBeforeBeanDiscovery());
-      
-      Assert.assertTrue(extensionObserver.isAfterBeanDiscovery());
-      Assert.assertTrue(extensionObserver.isAllAfterBeanDiscovery());
-      Assert.assertFalse(otherObserver.isAfterBeanDiscovery());
-      Assert.assertFalse(otherObserver.isAllAfterBeanDiscovery());
-      
-      Assert.assertTrue(extensionObserver.isProcessAnnotatedType());
-      Assert.assertTrue(extensionObserver.isAllProcessAnnnotatedType());
-      Assert.assertFalse(otherObserver.isProcessAnnotatedType());
-      Assert.assertFalse(otherObserver.isAllProcessAnnotatedType());
-      
-      Assert.assertTrue(extensionObserver.isProcessBean());
-      Assert.assertTrue(extensionObserver.isAllProcessBean());
-      Assert.assertFalse(otherObserver.isProcessBean());
-      Assert.assertFalse(otherObserver.isAllProcessBean());
-      
-      Assert.assertTrue(extensionObserver.isProcessInjectionTarget());
-      Assert.assertTrue(extensionObserver.isAllProcessInjectionTarget());
-      Assert.assertFalse(otherObserver.isProcessInjectionTarget());
-      Assert.assertFalse(otherObserver.isAllProcessInjectionTarget());
-      
-      Assert.assertTrue(extensionObserver.isProcessManagedBean());
-      Assert.assertTrue(extensionObserver.isAllProcessManagedBean());
-      Assert.assertFalse(otherObserver.isProcessManagedBean());
-      Assert.assertFalse(otherObserver.isAllProcessManagedBean());
-      
-      Assert.assertTrue(extensionObserver.isProcessObserverMethod());
-      Assert.assertTrue(extensionObserver.isAllProcessObserverMethod());
-      Assert.assertFalse(otherObserver.isProcessObserverMethod());
-      Assert.assertFalse(otherObserver.isAllProcessObserverMethod());
-      
-      Assert.assertTrue(extensionObserver.isProcessProducer());
-      Assert.assertTrue(extensionObserver.isAllProcessProducer());
-      Assert.assertFalse(otherObserver.isProcessProducer());
-      Assert.assertFalse(otherObserver.isAllProcessProducer());
-      
-      Assert.assertTrue(extensionObserver.isProcessProducerField());
-      Assert.assertTrue(extensionObserver.isAllProcessProducerField());
-      Assert.assertFalse(otherObserver.isProcessProducerField());
-      Assert.assertFalse(otherObserver.isAllProcessProducerField());
-      
-      Assert.assertTrue(extensionObserver.isProcessProducerMethod());
-      Assert.assertTrue(extensionObserver.isAllProcessProducerField());
-      Assert.assertFalse(otherObserver.isProcessProducerMethod());
-      Assert.assertFalse(otherObserver.isAllProcessProducerMethod());
-      
-      Assert.assertTrue(extensionObserver.isProcessSessionBean());
-      Assert.assertTrue(extensionObserver.isAllProcessSessionBean());
-      Assert.assertFalse(otherObserver.isProcessSessionBean());
-      Assert.assertFalse(otherObserver.isAllProcessSessionBean());
-      
-      Assert.assertTrue(extensionObserver.isAfterDeploymentValidation());
-      Assert.assertTrue(extensionObserver.isAllAfterDeploymentValidation());
-      Assert.assertFalse(otherObserver.isAfterDeploymentValidation());
-      Assert.assertFalse(otherObserver.isAllAfterDeploymentValidation());
+      assertNull(extensionObserver.getProcessProducerMethodInstance().getAnnotatedDisposedParameter());
    }
-   
+      
    @Test
    public void testInjectionTargetWrapped(Capercaillie capercaillie)
    {
-      Assert.assertTrue(Woodland.isPostConstructCalled());
-      Assert.assertTrue(WoodlandExtension.isInjectCalled());
-      Assert.assertTrue(WoodlandExtension.isPostConstructCalled());
-      Assert.assertTrue(WoodlandExtension.isPreDestroyCalled());
-      Assert.assertTrue(WoodlandExtension.isProduceCalled());
+      assertTrue(Woodland.isPostConstructCalled());
+      assertTrue(WoodlandExtension.isInjectCalled());
+      assertTrue(WoodlandExtension.isPostConstructCalled());
+      assertTrue(WoodlandExtension.isPreDestroyCalled());
+      assertTrue(WoodlandExtension.isProduceCalled());
    }
 }

Modified: core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/Foo.java
===================================================================
--- core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/Foo.java	2010-08-04 15:02:12 UTC (rev 6902)
+++ core/trunk/tests-arquillian/src/test/java/org/jboss/weld/tests/extensions/Foo.java	2010-08-04 17:08:05 UTC (rev 6903)
@@ -1,5 +1,5 @@
 /*
- * JBoss, Home of Professional Open Source
+c * JBoss, Home of Professional Open Source
  * Copyright 2010, Red Hat, Inc., and individual contributors
  * by the @authors tag. See the copyright.txt in the distribution for a
  * full listing of individual contributors.



More information about the weld-commits mailing list