openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1124898 - in /openwebbeans/trunk/webbeans-impl/src/test: java/org/apache/webbeans/newtests/decorators/generic/ java/org/apache/webbeans/newtests/decorators/tests/ java/org/apache/webbeans/test/component/decorator/generic/ resources/org/apa...
Date Thu, 19 May 2011 15:06:35 GMT
Author: struberg
Date: Thu May 19 15:06:35 2011
New Revision: 1124898

URL: http://svn.apache.org/viewvc?rev=1124898&view=rev
Log:
OWB-568 add tests for GenericDecorator issue

thanks to Arne Limburg for providing the basic test.
I now incorporated those into our newtests package.
The actual test in GenericDecoratorTest is currently 
commented out to not break our build!

Added:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/
      - copied from r1124691, openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/generic/
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/SampleDecorator.java
      - copied, changed from r1124691, openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/generic/TestDecorator.java
Removed:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/TestDecorator.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/generic/
Modified:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/DecoratedBean.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/GenericInterface.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.java
    openwebbeans/trunk/webbeans-impl/src/test/resources/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.xml

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/DecoratedBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/DecoratedBean.java?rev=1124898&r1=1124691&r2=1124898&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/DecoratedBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/DecoratedBean.java
Thu May 19 15:06:35 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.webbeans.test.component.decorator.generic;
+package org.apache.webbeans.newtests.decorators.generic;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Scope;

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/GenericInterface.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/GenericInterface.java?rev=1124898&r1=1124691&r2=1124898&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/GenericInterface.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/GenericInterface.java
Thu May 19 15:06:35 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.webbeans.test.component.decorator.generic;
+package org.apache.webbeans.newtests.decorators.generic;
 
 import java.lang.annotation.Annotation;
 

Copied: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/SampleDecorator.java
(from r1124691, openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/generic/TestDecorator.java)
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/SampleDecorator.java?p2=openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/SampleDecorator.java&p1=openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/generic/TestDecorator.java&r1=1124691&r2=1124898&rev=1124898&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/decorator/generic/TestDecorator.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/generic/SampleDecorator.java
Thu May 19 15:06:35 2011
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.webbeans.test.component.decorator.generic;
+package org.apache.webbeans.newtests.decorators.generic;
 
 import javax.decorator.Decorator;
 import javax.decorator.Delegate;
@@ -25,7 +25,7 @@ import javax.inject.Inject;
 import java.lang.annotation.Annotation;
 
 @Decorator
-public class TestDecorator<T extends Annotation> implements GenericInterface<T>
+public class SampleDecorator<T extends Annotation> implements GenericInterface<T>
 {
 
     @Inject

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.java?rev=1124898&r1=1124897&r2=1124898&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.java
Thu May 19 15:06:35 2011
@@ -35,6 +35,9 @@ import org.apache.webbeans.newtests.Abst
 import org.apache.webbeans.newtests.decorators.common.Cow;
 import org.apache.webbeans.newtests.decorators.common.Garphly;
 import org.apache.webbeans.newtests.decorators.common.GarphlyDecorator;
+import org.apache.webbeans.newtests.decorators.generic.DecoratedBean;
+import org.apache.webbeans.newtests.decorators.generic.GenericInterface;
+import org.apache.webbeans.newtests.decorators.generic.SampleDecorator;
 import org.junit.Test;
 
 public class GenericDecoratorTest extends AbstractUnitTest
@@ -67,4 +70,21 @@ public class GenericDecoratorTest extend
         
         shutDownContainer();
     }
+
+    //X TODO currently broken @Test
+    public void injection() throws Exception {
+        Collection<Class<?>> classes = new ArrayList<Class<?>>();
+        classes.add(DecoratedBean.class);
+        classes.add(GenericInterface.class);
+        classes.add(SampleDecorator.class);
+
+        Collection<String> xmls = new ArrayList<String>();
+        xmls.add(getXmlPath(PACKAGE_NAME, "GenericDecoratorTest"));
+
+        startContainer(classes, xmls);
+
+        DecoratedBean decoratedBean = (DecoratedBean) getInstance(DecoratedBean.class);
+        Assert.assertTrue(decoratedBean.isDecoratorCalled());
+    }
+
 }

Modified: openwebbeans/trunk/webbeans-impl/src/test/resources/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.xml
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/resources/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.xml?rev=1124898&r1=1124897&r2=1124898&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/resources/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.xml
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/resources/org/apache/webbeans/newtests/decorators/tests/GenericDecoratorTest.xml
Thu May 19 15:06:35 2011
@@ -20,5 +20,6 @@ under the License.
 <beans>
    <decorators>
       <class>org.apache.webbeans.newtests.decorators.common.GarphlyDecorator</class>
+      <class>org.apache.webbeans.newtests.decorators.generic.SampleDecorator</class>
    </decorators>
 </beans>



Mime
View raw message