Skip to content

Commit

Permalink
WELD-873 test
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Mar 25, 2011
1 parent 51de014 commit 7d46ecb
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
Expand Up @@ -19,6 +19,7 @@
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;

Expand Down Expand Up @@ -52,6 +53,8 @@ public static Archive<?> deploy()
@Inject
private BeanManagerImpl beanManager;

@Inject Wibble wibble;

@Test
// WELD-711
public void testResolveWithAnonymousAnnotationLiteral() throws Exception
Expand All @@ -62,4 +65,11 @@ public void testResolveWithAnonymousAnnotationLiteral() throws Exception
assertFalse(resolver.isCached(new ResolvableBuilder().addType(Foo.class).addQualifier(defaultQualifier).create()));
}

// WELD-873
@Test
public void testImplementsParameterizedType()
{
assertNull(wibble.get("bleh"));
}

}
@@ -0,0 +1,96 @@
package org.jboss.weld.tests.resolution;

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
{
@Inject
BeanManager beanManager;

public int size()
{
// TODO Auto-generated method stub
return 0;
}

public boolean isEmpty()
{
// TODO Auto-generated method stub
return false;
}

public boolean containsKey(Object key)
{
// TODO Auto-generated method stub
return false;
}

public boolean containsValue(Object value)
{
// TODO Auto-generated method stub
return false;
}

public ResourceBundle get(Object key)
{
if (beanManager == null)
{
throw new NullPointerException();
}
return null;
}

public ResourceBundle put(String key, ResourceBundle value)
{
// TODO Auto-generated method stub
return null;
}

public ResourceBundle remove(Object key)
{
// TODO Auto-generated method stub
return null;
}

public void putAll(Map<? extends String, ? extends ResourceBundle> m)
{
// TODO Auto-generated method stub

}

public void clear()
{
// TODO Auto-generated method stub

}

public Set<String> keySet()
{
// TODO Auto-generated method stub
return null;
}

public Collection<ResourceBundle> values()
{
// TODO Auto-generated method stub
return null;
}

public Set<java.util.Map.Entry<String, ResourceBundle>> entrySet()
{
// TODO Auto-generated method stub
return null;
}

}

0 comments on commit 7d46ecb

Please sign in to comment.