Skip to content

Commit

Permalink
WELD-873 test
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Mar 28, 2011
1 parent 3b5730c commit dbc2aaa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand All @@ -52,9 +50,9 @@ public static Archive<?> deploy()

@Inject
private BeanManagerImpl beanManager;

@Inject Wibble wibble;

@Test
// WELD-711
public void testResolveWithAnonymousAnnotationLiteral() throws Exception
Expand All @@ -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"));
}

}
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit dbc2aaa

Please sign in to comment.