Author: nickarls
Date: 2010-04-12 08:37:05 -0400 (Mon, 12 Apr 2010)
New Revision: 6094
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account1.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account2.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/AccountDecorator.java
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/TestMultiDelegate.java
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/multidelegate/
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/multidelegate/beans.xml
Log:
Test for
http://seamframework.org/Community/SerializableDecorators validity
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account.java 2010-04-12
12:37:05 UTC (rev 6094)
@@ -0,0 +1,9 @@
+package org.jboss.weld.tests.decorators.multidelegate;
+
+import java.math.BigDecimal;
+
+public interface Account {
+
+ public String withdraw(BigDecimal amount);
+
+}
\ No newline at end of file
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account1.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account1.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account1.java 2010-04-12
12:37:05 UTC (rev 6094)
@@ -0,0 +1,11 @@
+package org.jboss.weld.tests.decorators.multidelegate;
+
+import java.math.BigDecimal;
+
+public class Account1 implements Account {
+
+ public String withdraw(BigDecimal amount) {
+ return "Account1 withdraw";
+ }
+
+}
\ No newline at end of file
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account2.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account2.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/Account2.java 2010-04-12
12:37:05 UTC (rev 6094)
@@ -0,0 +1,11 @@
+package org.jboss.weld.tests.decorators.multidelegate;
+
+import java.math.BigDecimal;
+
+public class Account2 implements Account {
+
+ public String withdraw(BigDecimal amount) {
+ return "Account2 withdraw";
+ }
+
+}
\ No newline at end of file
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/AccountDecorator.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/AccountDecorator.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/AccountDecorator.java 2010-04-12
12:37:05 UTC (rev 6094)
@@ -0,0 +1,20 @@
+package org.jboss.weld.tests.decorators.multidelegate;
+
+import java.math.BigDecimal;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.enterprise.inject.Any;
+import javax.inject.Inject;
+
+@Decorator
+public class AccountDecorator implements Account {
+
+ @Inject @Delegate @Any Account account;
+
+ public String withdraw(BigDecimal amount) {
+ System.out.println("AccountDecorator withdraw " + account.toString());
+ return account.withdraw(amount);
+ }
+
+}
\ No newline at end of file
Added:
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/TestMultiDelegate.java
===================================================================
---
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/TestMultiDelegate.java
(rev 0)
+++
core/trunk/tests/src/test/java/org/jboss/weld/tests/decorators/multidelegate/TestMultiDelegate.java 2010-04-12
12:37:05 UTC (rev 6094)
@@ -0,0 +1,17 @@
+package org.jboss.weld.tests.decorators.multidelegate;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+@Artifact
+(a)BeansXml("beans.xml")
+public class TestMultiDelegate extends AbstractWeldTest
+{
+
+
@Test(description="http://seamframework.org/Community/SerializableDecorators")
+ public void go() {
+ }
+
+}
Added:
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/multidelegate/beans.xml
===================================================================
---
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/multidelegate/beans.xml
(rev 0)
+++
core/trunk/tests/src/test/resources/org/jboss/weld/tests/decorators/multidelegate/beans.xml 2010-04-12
12:37:05 UTC (rev 6094)
@@ -0,0 +1,5 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.tests.decorators.multidelegate.AccountDecorator</class>
+ </decorators>
+</beans>
\ No newline at end of file