openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1822895 - /openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/multiple/Decorator3.java
Date Thu, 01 Feb 2018 18:26:22 GMT
Author: struberg
Date: Thu Feb  1 18:26:21 2018
New Revision: 1822895

URL: http://svn.apache.org/viewvc?rev=1822895&view=rev
Log:
improve our decorator tests

Modified:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/multiple/Decorator3.java

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/multiple/Decorator3.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/multiple/Decorator3.java?rev=1822895&r1=1822894&r2=1822895&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/multiple/Decorator3.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/multiple/Decorator3.java
Thu Feb  1 18:26:21 2018
@@ -18,10 +18,15 @@
  */
 package org.apache.webbeans.test.decorators.multiple;
 
+import org.apache.webbeans.component.DecoratorBean;
+import org.junit.Assert;
+
 import javax.decorator.Decorator;
 import javax.decorator.Delegate;
 import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Decorated;
 import javax.enterprise.inject.Default;
+import javax.enterprise.inject.spi.Bean;
 import javax.inject.Inject;
 import javax.inject.Named;
 
@@ -32,10 +37,17 @@ public abstract class Decorator3 impleme
     @Inject @Delegate @Default @Any @Named IOutputProvider op;
     @Inject @Default RequestStringBuilder rsb;
 
+
+    @Inject javax.enterprise.inject.spi.Decorator<Decorator3> decoratorMetadata;
+    @Inject @Decorated Bean<IOutputProvider> beanMetadata;
+
     @Override
     public String getOutput()
     {
         rsb.addOutput("Decorator3\n");
+        Assert.assertTrue(decoratorMetadata instanceof DecoratorBean);
+        Assert.assertTrue(beanMetadata instanceof Bean);
+
         return op.getOutput();
     }
 }



Mime
View raw message