[weld-commits] Weld SVN: r4699 - core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Thu Nov 5 12:26:45 EST 2009


Author: marius.bogoevici
Date: 2009-11-05 12:26:45 -0500 (Thu, 05 Nov 2009)
New Revision: 4699

Modified:
   core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBean.java
   core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBeanImpl.java
   core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecoratorTest.java
Log:
breaking decorator test

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBean.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBean.java	2009-11-05 15:06:45 UTC (rev 4698)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBean.java	2009-11-05 17:26:45 UTC (rev 4699)
@@ -35,4 +35,6 @@
    int echo3(int i);
    
    int echo4(int i);
+
+   boolean isInvoked();
 }

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBeanImpl.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBeanImpl.java	2009-11-05 15:06:45 UTC (rev 4698)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleBeanImpl.java	2009-11-05 17:26:45 UTC (rev 4699)
@@ -29,24 +29,34 @@
 public class SimpleBeanImpl implements SimpleBean
 {
 
+   private boolean invoked  = false;
+
    public int echo1(int i)
    {
+      invoked = true;
       return i;
    }
 
    public int echo2(int i)
    {
+      invoked = true;
       return i;
    }
 
    public int echo3(int i)
    {
+      invoked = true;
       return i;
    }
 
    public int echo4(int i)
    {
+      invoked = true;
       return i;
    }
 
+   public boolean isInvoked()
+   {
+      return invoked;
+   }
 }

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecoratorTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecoratorTest.java	2009-11-05 15:06:45 UTC (rev 4698)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/SimpleDecoratorTest.java	2009-11-05 17:26:45 UTC (rev 4699)
@@ -14,7 +14,7 @@
 @BeansXml("beans.xml")
 public class SimpleDecoratorTest extends AbstractWeldTest
 {
-   @Test
+   @Test(groups = "broken")
    public void testSimpleDecorator()
    {
       SimpleBean simpleBean = getCurrentManager().getInstanceByType(SimpleBean.class);
@@ -22,19 +22,25 @@
       resetDecorators();
       assert simpleBean.echo1(1) == 1;
       assertDecorators(true, false, false);
+      assert simpleBean.isInvoked();
       
       resetDecorators();
       assert simpleBean.echo2(2) == 2;
       assertDecorators(false, true, false);
+      assert simpleBean.isInvoked();
 
       //Only SimpleDecorator1 gets invoked, although I think SimpleDecorator2 should get invoked too
       resetDecorators();
       assert simpleBean.echo3(3) == 3;
       assertDecorators(false, false, true);
-      
+
+      assert simpleBean.isInvoked();
+
       resetDecorators();
       assert simpleBean.echo4(4) == 4; 
       assertDecorators(false, false, false);
+
+      assert simpleBean.isInvoked();
    }
    
    private void resetDecorators()



More information about the weld-commits mailing list