[seam-commits] Seam SVN: r12429 - in modules/xml/trunk/impl/src/test: resources/org/jboss/seam/xml/test/method and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Apr 12 03:07:54 EDT 2010


Author: swd847
Date: 2010-04-12 03:07:53 -0400 (Mon, 12 Apr 2010)
New Revision: 12429

Modified:
   modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodBean.java
   modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTarget.java
   modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTest.java
   modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodValueBean.java
   modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/method/method-beans.xml
Log:
updated test to deal with parameters that are a paramatized type



Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodBean.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodBean.java	2010-04-11 07:39:13 UTC (rev 12428)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodBean.java	2010-04-12 07:07:53 UTC (rev 12429)
@@ -4,6 +4,8 @@
  */
 package org.jboss.seam.xml.test.method;
 
+import javax.enterprise.inject.Instance;
+
 public class MethodBean
 {
 
@@ -21,5 +23,10 @@
    {
       return beans.length;
    }
+   
+   public int method(Instance<MethodValueBean> bean)
+   {
+	   return bean.get().getValue() + 1;
+   }
 
 }

Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTarget.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTarget.java	2010-04-11 07:39:13 UTC (rev 12428)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTarget.java	2010-04-12 07:07:53 UTC (rev 12429)
@@ -7,7 +7,7 @@
 public class MethodTarget
 {
 
-   public int value1, value2;
+   public int value1, value2,value3;
 
    public long longValue;
 }

Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTest.java	2010-04-11 07:39:13 UTC (rev 12428)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTest.java	2010-04-12 07:07:53 UTC (rev 12429)
@@ -23,6 +23,7 @@
       assert x != null;
       assert x.value1 == 1;
       assert x.value2 == 11;
+      assert x.value3 == 11;
       assert x.longValue == 10;
 
    }

Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodValueBean.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodValueBean.java	2010-04-11 07:39:13 UTC (rev 12428)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodValueBean.java	2010-04-12 07:07:53 UTC (rev 12429)
@@ -7,4 +7,12 @@
 public class MethodValueBean
 {
    public int value = 10;
+
+public int getValue() {
+	return value;
 }
+
+public void setValue(int value) {
+	this.value = value;
+}
+}

Modified: modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/method/method-beans.xml
===================================================================
--- modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/method/method-beans.xml	2010-04-11 07:39:13 UTC (rev 12428)
+++ modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/method/method-beans.xml	2010-04-12 07:07:53 UTC (rev 12429)
@@ -36,7 +36,16 @@
                 </array>
             </parameters>
         </test:method>
-
+        
+		<test:method>
+            <Produces />
+            <test:Qualifier2 />
+            <parameters>
+                <Instance>
+                    <test:Qualifier2 />
+                </Instance>
+            </parameters>
+        </test:method>
     </test:MethodBean>
 
     <test:MethodTarget>
@@ -48,6 +57,10 @@
             <Inject />
             <test:Qualifier1 />
         </test:value2>
+        <test:value3>
+            <Inject />
+            <test:Qualifier2 />
+        </test:value3>
         <test:longValue>
             <Inject />
             <test:Qualifier1 />



More information about the seam-commits mailing list