Author: nickarls
Date: 2009-03-18 16:44:18 -0400 (Wed, 18 Mar 2009)
New Revision: 2098
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java
Log:
WBRI-192 tests, thanks to Takeshi Kondo
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScoped.java 2009-03-18
20:44:18 UTC (rev 2098)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.test.unit.context;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.context.RequestScoped;
+import javax.inject.Produces;
+
+public class ParameterizedTypeScoped
+{
+
+ @RequestScoped
+ @Produces
+ public List<String> create()
+ {
+ return Arrays.asList("iemon", "houjitya");
+ }
+}
Added:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java
(rev 0)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ParameterizedTypeScopedTest.java 2009-03-18
20:44:18 UTC (rev 2098)
@@ -0,0 +1,24 @@
+package org.jboss.webbeans.test.unit.context;
+
+import java.util.List;
+
+import javax.inject.TypeLiteral;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class ParameterizedTypeScopedTest extends AbstractWebBeansTest
+{
+
+ @Test
+ public void testStringList()
+ {
+ List<String> str = manager.getInstanceByType(new
TypeLiteral<List<String>>()
+ {
+ });
+
+ assert str.size() == 2;
+ }
+}
Show replies by date