[seam-commits] Seam SVN: r12621 - in modules/xml/trunk/impl/src/test: resources/org/jboss/seam/xml/test/generic and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Fri Apr 23 19:12:29 EDT 2010
Author: swd847
Date: 2010-04-23 19:12:28 -0400 (Fri, 23 Apr 2010)
New Revision: 12621
Modified:
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericDependant.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericMain.java
modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml
Log:
update generic beans test
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericBeanTest.java 2010-04-23 21:45:10 UTC (rev 12620)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericBeanTest.java 2010-04-23 23:12:28 UTC (rev 12621)
@@ -32,4 +32,21 @@
;
}
+ @Test
+ public void genericBeansInitMethodTest()
+ {
+ GenericDependant dep = getReference(GenericDependant.class, new AnnotationLiteral<HighGenericQualifier>()
+ {
+ });
+ assert dep.initCalled;
+ dep = getReference(GenericDependant.class, new AnnotationLiteral<LowGenericQualifier>()
+ {
+ });
+ assert dep.initCalled;
+ GenericMain main = getReference(GenericMain.class, new AnnotationLiteral<LowGenericQualifier>()
+ {
+ });
+ assert main.init;
+ }
+
}
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericDependant.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericDependant.java 2010-04-23 21:45:10 UTC (rev 12620)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericDependant.java 2010-04-23 23:12:28 UTC (rev 12621)
@@ -7,6 +7,14 @@
@Inject
GenericMain instance;
+ boolean initCalled = false;
+
+ @Inject
+ public void init()
+ {
+ initCalled = true;
+ }
+
public int getValue()
{
return instance.getConfiguredValue() + 1;
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericMain.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericMain.java 2010-04-23 21:45:10 UTC (rev 12620)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericMain.java 2010-04-23 23:12:28 UTC (rev 12621)
@@ -1,9 +1,19 @@
package org.jboss.seam.xml.test.generic;
+import javax.inject.Inject;
+
public class GenericMain
{
int configuredValue;
+ boolean init = false;
+
+ @Inject
+ public void setup()
+ {
+ init = true;
+ }
+
public int getConfiguredValue()
{
return configuredValue;
Modified: modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml
===================================================================
--- modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml 2010-04-23 21:45:10 UTC (rev 12620)
+++ modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml 2010-04-23 23:12:28 UTC (rev 12621)
@@ -12,12 +12,12 @@
</test:GenericDependant>
</genericBean>
- <test:GenericMain>
+ <test:GenericMain><specializes/>
<test:HighGenericQualifier/>
<test:configuredValue><value>100</value></test:configuredValue>
</test:GenericMain>
- <test:GenericMain>
+ <test:GenericMain><specializes/>
<test:LowGenericQualifier/>
<test:configuredValue><value>10</value></test:configuredValue>
</test:GenericMain>
More information about the seam-commits
mailing list