Permalink
Browse files

WELD-873 test

  • Loading branch information...
1 parent 3b5730c commit dbc2aaa25daeb7ae95d02be5dc47bfc28fee7ed5 @stuartwdouglas stuartwdouglas committed Mar 28, 2011
@@ -16,17 +16,6 @@
*/
package org.jboss.weld.tests.resolution;
-import static org.jboss.weld.test.Utils.getReference;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.lang.annotation.Annotation;
-
-import javax.enterprise.inject.Default;
-import javax.enterprise.util.AnnotationLiteral;
-import javax.inject.Inject;
-
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
@@ -39,11 +28,20 @@
import org.junit.Test;
import org.junit.runner.RunWith;
+import javax.enterprise.inject.Default;
+import javax.enterprise.util.AnnotationLiteral;
+import javax.inject.Inject;
+import java.lang.annotation.Annotation;
+import java.util.Map;
+
+import static org.jboss.weld.test.Utils.getReference;
+import static org.junit.Assert.*;
+
@RunWith(Arquillian.class)
-public class ResolutionTest
+public class ResolutionTest
{
@Deployment
- public static Archive<?> deploy()
+ public static Archive<?> deploy()
{
return ShrinkWrap.create(BeanArchive.class)
.addPackage(ResolutionTest.class.getPackage())
@@ -52,9 +50,9 @@
@Inject
private BeanManagerImpl beanManager;
-
+
@Inject Wibble wibble;
-
+
@Test
// WELD-711
public void testResolveWithAnonymousAnnotationLiteral() throws Exception
@@ -64,12 +62,19 @@ public void testResolveWithAnonymousAnnotationLiteral() throws Exception
TypeSafeBeanResolver<?> resolver = beanManager.getBeanResolver();
assertFalse(resolver.isCached(new ResolvableBuilder().addType(Foo.class).addQualifier(defaultQualifier).create()));
}
-
+
// WELD-873
@Test
- public void testImplementsParameterizedType()
+ public void testCallingUserMethod()
{
assertNull(wibble.get("bleh"));
}
-
+
+ // WELD-873
+ @Test
+ public void testCallingBridgeMethod()
+ {
+ assertNull(((Map)wibble).get("bleh"));
+ }
+
}
@@ -1,16 +1,15 @@
package org.jboss.weld.tests.resolution;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.inject.Inject;
+import javax.inject.Named;
import java.io.Serializable;
import java.util.Collection;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.inject.Inject;
-import javax.inject.Named;
-
@RequestScoped
@Named
public class Wibble implements Map<String, ResourceBundle>, Serializable

0 comments on commit dbc2aaa

Please sign in to comment.