[webbeans-commits] Webbeans SVN: r1983 - in ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation: annotatedItem and 3 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Fri Mar 13 14:12:04 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-03-13 14:12:03 -0400 (Fri, 13 Mar 2009)
New Revision: 1983

Added:
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBeanLocal.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Animal.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Antelope.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Order.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/Mouse.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/MouseLocal.java
Removed:
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Mouse.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java
Modified:
   ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java
Log:
Start to fix i/c errors


Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-interface Animal
-{
-
-}

Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -1,6 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-class Antelope implements Animal
-{
-
-}

Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -1,51 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import java.lang.annotation.Annotation;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.annotation.Stereotype;
-import javax.inject.DeploymentType;
-import javax.inject.Production;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.webbeans.introspector.AnnotatedClass;
-import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
-import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
-import org.testng.annotations.Test;
-
- at Artifact
-public class ClassAnnotatedItemTest extends AbstractWebBeansTest
-{
-   
-   @Test
-   public void testDeclaredAnnotations()
-   {
-      AnnotatedClass<Order> annotatedElement = AnnotatedClassImpl.of(Order.class);
-      assert annotatedElement.getAnnotationsAsSet().size() == 1;
-      assert annotatedElement.getAnnotation(Production.class) != null;
-      assert annotatedElement.getType().equals(Order.class);
-   }
-   
-   @Test
-   public void testMetaAnnotations()
-   {
-      AnnotatedClass<Order> annotatedElement = AnnotatedClassImpl.of(Order.class);
-      Set<Annotation> annotations = annotatedElement.getMetaAnnotations(DeploymentType.class);
-      assert annotations.size() == 1;
-      Iterator<Annotation> it = annotations.iterator();
-      Annotation production = it.next();
-      assert Production.class.equals(production.annotationType());
-   }
-   
-   @Test
-   public void testEmpty()
-   {
-      AnnotatedClass<Order> annotatedElement = AnnotatedClassImpl.of(Order.class);
-      assert annotatedElement.getAnnotation(Stereotype.class) == null;
-      assert annotatedElement.getMetaAnnotations(Stereotype.class).size() == 0;
-      AnnotatedClass<Antelope> classWithNoAnnotations = AnnotatedClassImpl.of(Antelope.class);
-      assert classWithNoAnnotations.getAnnotationsAsSet().size() == 0;
-   }
-   
-}

Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -1,37 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import javassist.util.proxy.ProxyObject;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
-import org.testng.annotations.Test;
-
- at Artifact
- at Packaging(PackagingType.EAR)
-public class EnterpriseBeanProxyTest extends AbstractWebBeansTest
-{
-   
-   /**
-    * <a href="https://jira.jboss.org/jira/browse/WBRI-109">WBRI-109</a>
-    */
-   @Test
-   public void testNoInterfaceView() throws Exception
-   {
-      new RunInDependentContext()
-      {
-         
-         @Override
-         protected void execute() throws Exception
-         {
-            Object mouse = manager.getInstanceByType(Mouse.class);
-            assert mouse instanceof ProxyObject;
-            assert mouse instanceof Mouse;
-         }
-         
-      }.run();
-      
-   }
-   
-}

Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Mouse.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Mouse.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Mouse.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import javax.ejb.Stateless;
-
- at Stateless
-public class Mouse
-{
-   
-}

Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -1,68 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import java.util.Set;
-
-import javax.inject.New;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.webbeans.bean.NewSimpleBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.introspector.AnnotatedItem;
-import org.jboss.webbeans.literal.NewLiteral;
-import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
- at Artifact
-public class NewSimpleBeanTest extends AbstractWebBeansTest
-{
-   private SimpleBean<WrappedSimpleBean> wrappedSimpleBean;
-   private NewSimpleBean<WrappedSimpleBean> newSimpleBean;
-   
-   private static final New NEW_LITERAL = new NewLiteral();
-   
-   @BeforeMethod
-   public void initNewBean() {
-      
-      assert manager.resolveByType(WrappedSimpleBean.class).size() == 1;
-      assert manager.resolveByType(WrappedSimpleBean.class).iterator().next() instanceof SimpleBean;
-      wrappedSimpleBean = (SimpleBean<WrappedSimpleBean>) manager.resolveByType(WrappedSimpleBean.class).iterator().next();
-      
-      assert manager.resolveByType(WrappedSimpleBean.class, NEW_LITERAL).size() == 1;
-      assert manager.resolveByType(WrappedSimpleBean.class, NEW_LITERAL).iterator().next() instanceof NewSimpleBean;
-      newSimpleBean = (NewSimpleBean<WrappedSimpleBean>) manager.resolveByType(WrappedSimpleBean.class, NEW_LITERAL).iterator().next();
-   }
-
-   @Test(groups = { "new" })
-   public void testNewBeanHasImplementationClassOfInjectionPointType()
-   {
-      assert newSimpleBean.getType().equals(WrappedSimpleBean.class);
-   }
-
-   @Test(groups = { "new" })
-   public void testNewBeanIsSimpleWebBeanIfParameterTypeIsSimpleWebBean()
-   {
-      assert newSimpleBean.getType().equals(wrappedSimpleBean.getType());
-   }
-
-   @Test(groups = { "new" })
-   public void testNewBeanHasSameConstructorAsWrappedBean()
-   {
-      assert wrappedSimpleBean.getConstructor().equals(newSimpleBean.getConstructor());
-   }
-
-   @Test(groups = { "new" })
-   public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
-   {
-      assert newSimpleBean.getInitializerMethods().equals(wrappedSimpleBean.getInitializerMethods());
-   }
-
-   @Test(groups = { "new" })
-   public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
-   {
-      Set<? extends AnnotatedItem<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getInjectionPoints();
-      Set<? extends AnnotatedItem<?, ?>> newBeanInjectionPoints = newSimpleBean.getInjectionPoints();
-      assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
-   }
-   
-}

Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -1,9 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import javax.inject.Production;
-
- at Production
-class Order
-{
-
-}

Modified: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBean.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -8,7 +8,7 @@
 @SessionScoped
 @Stateful
 @Named("John")
-class WrappedEnterpriseBean
+class WrappedEnterpriseBean implements WrappedEnterpriseBeanLocal
 {
    @Remove
    public void bye() {

Added: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBeanLocal.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBeanLocal.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBeanLocal.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.implementation;
+
+import javax.ejb.Local;
+
+ at Local
+public interface WrappedEnterpriseBeanLocal
+{
+   
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedEnterpriseBeanLocal.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java	2009-03-13 17:59:48 UTC (rev 1982)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -1,15 +0,0 @@
-package org.jboss.webbeans.test.unit.implementation;
-
-import java.io.Serializable;
-
-import javax.annotation.Named;
-import javax.context.SessionScoped;
-
- at SessionScoped
- at Named("Fred")
-class WrappedSimpleBean implements Serializable
-{
-   public WrappedSimpleBean() {
-      
-   }
-}

Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Animal.java (from rev 1971, ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Animal.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Animal.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Animal.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.test.unit.implementation.annotatedItem;
+
+interface Animal
+{
+
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Animal.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Antelope.java (from rev 1971, ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Antelope.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Antelope.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Antelope.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,7 @@
+package org.jboss.webbeans.test.unit.implementation.annotatedItem;
+
+
+class Antelope implements Animal
+{
+
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Antelope.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java (from rev 1973, ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/ClassAnnotatedItemTest.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,51 @@
+package org.jboss.webbeans.test.unit.implementation.annotatedItem;
+
+import java.lang.annotation.Annotation;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.annotation.Stereotype;
+import javax.inject.DeploymentType;
+import javax.inject.Production;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.introspector.AnnotatedClass;
+import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+ at Artifact
+public class ClassAnnotatedItemTest extends AbstractWebBeansTest
+{
+   
+   @Test
+   public void testDeclaredAnnotations()
+   {
+      AnnotatedClass<Order> annotatedElement = AnnotatedClassImpl.of(Order.class);
+      assert annotatedElement.getAnnotationsAsSet().size() == 1;
+      assert annotatedElement.getAnnotation(Production.class) != null;
+      assert annotatedElement.getType().equals(Order.class);
+   }
+   
+   @Test
+   public void testMetaAnnotations()
+   {
+      AnnotatedClass<Order> annotatedElement = AnnotatedClassImpl.of(Order.class);
+      Set<Annotation> annotations = annotatedElement.getMetaAnnotations(DeploymentType.class);
+      assert annotations.size() == 1;
+      Iterator<Annotation> it = annotations.iterator();
+      Annotation production = it.next();
+      assert Production.class.equals(production.annotationType());
+   }
+   
+   @Test
+   public void testEmpty()
+   {
+      AnnotatedClass<Order> annotatedElement = AnnotatedClassImpl.of(Order.class);
+      assert annotatedElement.getAnnotation(Stereotype.class) == null;
+      assert annotatedElement.getMetaAnnotations(Stereotype.class).size() == 0;
+      AnnotatedClass<Antelope> classWithNoAnnotations = AnnotatedClassImpl.of(Antelope.class);
+      assert classWithNoAnnotations.getAnnotationsAsSet().size() == 0;
+   }
+   
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Order.java (from rev 1971, ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Order.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Order.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Order.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.implementation.annotatedItem;
+
+import javax.inject.Production;
+
+ at Production
+class Order
+{
+
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/annotatedItem/Order.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java (from rev 1973, ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/NewSimpleBeanTest.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/NewSimpleBeanTest.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,71 @@
+package org.jboss.webbeans.test.unit.implementation.newsimple;
+
+import java.util.Set;
+
+import javax.inject.New;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.bean.NewSimpleBean;
+import org.jboss.webbeans.bean.SimpleBean;
+import org.jboss.webbeans.introspector.AnnotatedItem;
+import org.jboss.webbeans.literal.NewLiteral;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+ at Artifact
+public class NewSimpleBeanTest extends AbstractWebBeansTest
+{
+   private SimpleBean<WrappedSimpleBean> wrappedSimpleBean;
+   private NewSimpleBean<WrappedSimpleBean> newSimpleBean;
+   
+   private static final New NEW_LITERAL = new NewLiteral();
+   
+   public void initNewBean() {
+      
+      assert manager.resolveByType(WrappedSimpleBean.class).size() == 1;
+      assert manager.resolveByType(WrappedSimpleBean.class).iterator().next() instanceof SimpleBean;
+      wrappedSimpleBean = (SimpleBean<WrappedSimpleBean>) manager.resolveByType(WrappedSimpleBean.class).iterator().next();
+      
+      assert manager.resolveByType(WrappedSimpleBean.class, NEW_LITERAL).size() == 1;
+      assert manager.resolveByType(WrappedSimpleBean.class, NEW_LITERAL).iterator().next() instanceof NewSimpleBean;
+      newSimpleBean = (NewSimpleBean<WrappedSimpleBean>) manager.resolveByType(WrappedSimpleBean.class, NEW_LITERAL).iterator().next();
+   }
+
+   @Test(groups = { "new" })
+   public void testNewBeanHasImplementationClassOfInjectionPointType()
+   {
+      initNewBean();
+      assert newSimpleBean.getType().equals(WrappedSimpleBean.class);
+   }
+
+   @Test(groups = { "new" })
+   public void testNewBeanIsSimpleWebBeanIfParameterTypeIsSimpleWebBean()
+   {
+      initNewBean();
+      assert newSimpleBean.getType().equals(wrappedSimpleBean.getType());
+   }
+
+   @Test(groups = { "new" })
+   public void testNewBeanHasSameConstructorAsWrappedBean()
+   {
+      initNewBean();
+      assert wrappedSimpleBean.getConstructor().equals(newSimpleBean.getConstructor());
+   }
+
+   @Test(groups = { "new" })
+   public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
+   {
+      initNewBean();
+      assert newSimpleBean.getInitializerMethods().equals(wrappedSimpleBean.getInitializerMethods());
+   }
+
+   @Test(groups = { "new" })
+   public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
+   {
+      initNewBean();
+      Set<? extends AnnotatedItem<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getInjectionPoints();
+      Set<? extends AnnotatedItem<?, ?>> newBeanInjectionPoints = newSimpleBean.getInjectionPoints();
+      assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
+   }
+   
+}

Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java (from rev 1971, ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/WrappedSimpleBean.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.test.unit.implementation.newsimple;
+
+import java.io.Serializable;
+
+import javax.annotation.Named;
+import javax.context.SessionScoped;
+
+ at SessionScoped
+ at Named("Fred")
+class WrappedSimpleBean implements Serializable
+{
+   public WrappedSimpleBean() {
+      
+   }
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/newsimple/WrappedSimpleBean.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java (from rev 1973, ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,37 @@
+package org.jboss.webbeans.test.unit.implementation.proxy.enterprise;
+
+import javassist.util.proxy.ProxyObject;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+ at Artifact
+ at Packaging(PackagingType.EAR)
+public class EnterpriseBeanProxyTest extends AbstractWebBeansTest
+{
+   
+   /**
+    * <a href="https://jira.jboss.org/jira/browse/WBRI-109">WBRI-109</a>
+    */
+   @Test
+   public void testNoInterfaceView() throws Exception
+   {
+      new RunInDependentContext()
+      {
+         
+         @Override
+         protected void execute() throws Exception
+         {
+            Object mouse = manager.getInstanceByType(MouseLocal.class);
+            assert mouse instanceof ProxyObject;
+            assert mouse instanceof MouseLocal;
+         }
+         
+      }.run();
+      
+   }
+   
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/Mouse.java (from rev 1971, ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/Mouse.java)
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/Mouse.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/Mouse.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.implementation.proxy.enterprise;
+
+import javax.ejb.Stateless;
+
+ at Stateless
+public class Mouse implements MouseLocal
+{
+   
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/Mouse.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/MouseLocal.java
===================================================================
--- ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/MouseLocal.java	                        (rev 0)
+++ ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/MouseLocal.java	2009-03-13 18:12:03 UTC (rev 1983)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.test.unit.implementation.proxy.enterprise;
+
+import javax.ejb.Local;
+
+ at Local
+public interface MouseLocal
+{
+   
+}


Property changes on: ri/trunk/impl/src/test/java/org/jboss/webbeans/test/unit/implementation/proxy/enterprise/MouseLocal.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the weld-commits mailing list