Skip to content

Commit

Permalink
Start to fix i/c errors
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@1983 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Mar 13, 2009
1 parent 7c1f7b9 commit a4ce3cc
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 39 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -8,7 +8,7 @@
@SessionScoped
@Stateful
@Named("John")
class WrappedEnterpriseBean
class WrappedEnterpriseBean implements WrappedEnterpriseBeanLocal
{
@Remove
public void bye() {
Expand Down
@@ -0,0 +1,9 @@
package org.jboss.webbeans.test.unit.implementation;

import javax.ejb.Local;

@Local
public interface WrappedEnterpriseBeanLocal
{

}
@@ -0,0 +1,6 @@
package org.jboss.webbeans.test.unit.implementation.annotatedItem;

interface Animal
{

}
@@ -0,0 +1,7 @@
package org.jboss.webbeans.test.unit.implementation.annotatedItem;


class Antelope implements Animal
{

}
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.implementation;
package org.jboss.webbeans.test.unit.implementation.annotatedItem;

import java.lang.annotation.Annotation;
import java.util.Iterator;
Expand Down
@@ -0,0 +1,9 @@
package org.jboss.webbeans.test.unit.implementation.annotatedItem;

import javax.inject.Production;

@Production
class Order
{

}
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.implementation;
package org.jboss.webbeans.test.unit.implementation.newsimple;

import java.util.Set;

Expand All @@ -10,7 +10,6 @@
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.literal.NewLiteral;
import org.jboss.webbeans.test.unit.AbstractWebBeansTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

@Artifact
Expand All @@ -21,7 +20,6 @@ public class NewSimpleBeanTest extends AbstractWebBeansTest

private static final New NEW_LITERAL = new NewLiteral();

@BeforeMethod
public void initNewBean() {

assert manager.resolveByType(WrappedSimpleBean.class).size() == 1;
Expand All @@ -36,30 +34,35 @@ public void initNewBean() {
@Test(groups = { "new" })
public void testNewBeanHasImplementationClassOfInjectionPointType()
{
initNewBean();
assert newSimpleBean.getType().equals(WrappedSimpleBean.class);
}

@Test(groups = { "new" })
public void testNewBeanIsSimpleWebBeanIfParameterTypeIsSimpleWebBean()
{
initNewBean();
assert newSimpleBean.getType().equals(wrappedSimpleBean.getType());
}

@Test(groups = { "new" })
public void testNewBeanHasSameConstructorAsWrappedBean()
{
initNewBean();
assert wrappedSimpleBean.getConstructor().equals(newSimpleBean.getConstructor());
}

@Test(groups = { "new" })
public void testNewBeanHasSameInitializerMethodsAsWrappedBean()
{
initNewBean();
assert newSimpleBean.getInitializerMethods().equals(wrappedSimpleBean.getInitializerMethods());
}

@Test(groups = { "new" })
public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
{
initNewBean();
Set<? extends AnnotatedItem<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getInjectionPoints();
Set<? extends AnnotatedItem<?, ?>> newBeanInjectionPoints = newSimpleBean.getInjectionPoints();
assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.implementation;
package org.jboss.webbeans.test.unit.implementation.newsimple;

import java.io.Serializable;

Expand Down
@@ -1,4 +1,4 @@
package org.jboss.webbeans.test.unit.implementation;
package org.jboss.webbeans.test.unit.implementation.proxy.enterprise;

import javassist.util.proxy.ProxyObject;

Expand All @@ -25,9 +25,9 @@ public void testNoInterfaceView() throws Exception
@Override
protected void execute() throws Exception
{
Object mouse = manager.getInstanceByType(Mouse.class);
Object mouse = manager.getInstanceByType(MouseLocal.class);
assert mouse instanceof ProxyObject;
assert mouse instanceof Mouse;
assert mouse instanceof MouseLocal;
}

}.run();
Expand Down
@@ -0,0 +1,9 @@
package org.jboss.webbeans.test.unit.implementation.proxy.enterprise;

import javax.ejb.Stateless;

@Stateless
public class Mouse implements MouseLocal
{

}
@@ -0,0 +1,9 @@
package org.jboss.webbeans.test.unit.implementation.proxy.enterprise;

import javax.ejb.Local;

@Local
public interface MouseLocal
{

}

0 comments on commit a4ce3cc

Please sign in to comment.