Skip to content

Commit

Permalink
Replace all instances of component with bean
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@152 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Oct 25, 2008
1 parent b95ad43 commit 8599425
Show file tree
Hide file tree
Showing 102 changed files with 291 additions and 388 deletions.
Expand Up @@ -3,103 +3,103 @@
import org.testng.annotations.Test;

@SpecVersion("20080605")
public class ComponentDeploymentTest
public class BeanDeploymentTest
{


@Test(groups="specialization") @SpecAssertion(section="3.1.4")
public void testOnlySpecializedSimpleComponentDeployed()
public void testOnlySpecializedSimpleBeanDeployed()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.1.4")
public void testSpecializedSimpleComponentExtends()
public void testSpecializedSimpleBeanExtends()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.1.4")
public void testSpecializedSimpleComponentHasSameBindingAnnotations()
public void testSpecializedSimpleBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.1.4")
public void testSpecializedSimpleComponentHasSameName()
public void testSpecializedSimpleBeanHasSameName()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.2.4")
public void testOnlySpecializedEnterpriseComponentDeployed()
public void testOnlySpecializedEnterpriseBeanDeployed()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.2.4")
public void testSpecializedEnterpriseComponentExtends()
public void testSpecializedEnterpriseBeanExtends()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.2.4")
public void testSpecializedEnterpriseComponentHasSameBindingAnnotations()
public void testSpecializedEnterpriseBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.2.4")
public void testSpecializedEnterpriseComponentHasSameName()
public void testSpecializedEnterpriseBeanHasSameName()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.2.4")
public void testSpecializedEnterpriseComponentAllLocalInterfaces()
public void testSpecializedEnterpriseBeanAllLocalInterfaces()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.2.4")
public void testSpecializedEnterpriseComponentSupportsBeanClassLocalView()
public void testSpecializedEnterpriseBeanSupportsBeanClassLocalView()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.3.3")
public void testOnlySpecializedProducerMethodComponentDeployed()
public void testOnlySpecializedProducerMethodBeanDeployed()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.3.3")
public void testSpecializedProducerMethodComponentDirectlyOverrides()
public void testSpecializedProducerMethodBeanDirectlyOverrides()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.3.3")
public void testSpecializedProducerMethodComponentHasSameBindingAnnotations()
public void testSpecializedProducerMethodBeanHasSameBindingAnnotations()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.3.3")
public void testSpecializedProducerMethodComponentHasSameName()
public void testSpecializedProducerMethodBeanHasSameName()
{
// TODO Placeholder
assert false;
Expand Down
Expand Up @@ -14,10 +14,10 @@
import org.jboss.webbeans.model.bean.SimpleBeanModel;
import org.jboss.webbeans.test.annotations.Asynchronous;
import org.jboss.webbeans.test.annotations.Synchronous;
import org.jboss.webbeans.test.beans.Antelope;
import org.jboss.webbeans.test.beans.Cat;
import org.jboss.webbeans.test.beans.Order;
import org.jboss.webbeans.test.bindings.AsynchronousAnnotationLiteral;
import org.jboss.webbeans.test.components.Antelope;
import org.jboss.webbeans.test.components.Cat;
import org.jboss.webbeans.test.components.Order;
import org.jboss.webbeans.util.Reflections;
import org.testng.annotations.Test;

Expand Down
Expand Up @@ -10,8 +10,8 @@

import org.jboss.webbeans.introspector.AnnotatedType;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.test.components.Antelope;
import org.jboss.webbeans.test.components.Order;
import org.jboss.webbeans.test.beans.Antelope;
import org.jboss.webbeans.test.beans.Order;
import org.testng.annotations.Test;

public class ClassAnnotatedItemTest
Expand Down
Expand Up @@ -8,14 +8,14 @@
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.bean.SimpleBeanModel;
import org.jboss.webbeans.test.annotations.Synchronous;
import org.jboss.webbeans.test.components.Chicken;
import org.jboss.webbeans.test.components.Donkey;
import org.jboss.webbeans.test.components.Duck;
import org.jboss.webbeans.test.components.Goat;
import org.jboss.webbeans.test.components.Goose;
import org.jboss.webbeans.test.components.Order;
import org.jboss.webbeans.test.components.Sheep;
import org.jboss.webbeans.test.components.Turkey;
import org.jboss.webbeans.test.beans.Chicken;
import org.jboss.webbeans.test.beans.Donkey;
import org.jboss.webbeans.test.beans.Duck;
import org.jboss.webbeans.test.beans.Goat;
import org.jboss.webbeans.test.beans.Goose;
import org.jboss.webbeans.test.beans.Order;
import org.jboss.webbeans.test.beans.Sheep;
import org.jboss.webbeans.test.beans.Turkey;
import org.jboss.webbeans.util.Reflections;
import org.testng.annotations.Test;

Expand Down
Expand Up @@ -9,7 +9,7 @@
import org.jboss.webbeans.BeanImpl;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.bean.SimpleBeanModel;
import org.jboss.webbeans.test.components.Tuna;
import org.jboss.webbeans.test.beans.Tuna;
import org.jboss.webbeans.test.util.Util;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
Expand Down
Expand Up @@ -18,8 +18,8 @@
import org.jboss.webbeans.model.bean.SimpleBeanModel;
import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
import org.jboss.webbeans.test.annotations.Asynchronous;
import org.jboss.webbeans.test.beans.Tuna;
import org.jboss.webbeans.test.bindings.AsynchronousAnnotationLiteral;
import org.jboss.webbeans.test.components.Tuna;
import org.jboss.webbeans.test.mock.MockManagerImpl;
import org.jboss.webbeans.test.mock.MockObserverImpl;
import org.testng.annotations.Test;
Expand Down
@@ -1,9 +1,9 @@
package org.jboss.webbeans.test;

import org.jboss.webbeans.ejb.EjbMetaData;
import org.jboss.webbeans.test.components.Leopard;
import org.jboss.webbeans.test.components.Lion;
import org.jboss.webbeans.test.components.Tiger;
import org.jboss.webbeans.test.beans.Leopard;
import org.jboss.webbeans.test.beans.Lion;
import org.jboss.webbeans.test.beans.Tiger;
import org.testng.annotations.Test;

public class EjbMetaDataTest
Expand Down
Expand Up @@ -2,18 +2,18 @@

import org.testng.annotations.Test;

public class EnterpriseComponentLifecycleTest
public class EnterpriseBeanLifecycleTest
{

@Test(groups="componentLifecycle") @SpecAssertion(section="3.2.3")
@Test(groups="beanLifecycle") @SpecAssertion(section="3.2.3")
public void testInjectonOfParametersIntoRemoveMethod()
{
// TODO Placeholder
assert false;
}

@Test(groups="specialization") @SpecAssertion(section="3.2.4")
public void testSpecializedComponentAlwaysUsed()
public void testSpecializedBeanAlwaysUsed()
{
// TODO Placeholder
assert false;
Expand Down
Expand Up @@ -14,20 +14,20 @@
import org.jboss.webbeans.model.bean.AbstractEnterpriseBeanModel;
import org.jboss.webbeans.model.bean.EnterpriseBeanModel;
import org.jboss.webbeans.test.annotations.Synchronous;
import org.jboss.webbeans.test.components.Bear;
import org.jboss.webbeans.test.components.Cheetah;
import org.jboss.webbeans.test.components.Cougar;
import org.jboss.webbeans.test.components.Elephant;
import org.jboss.webbeans.test.components.Giraffe;
import org.jboss.webbeans.test.components.Leopard;
import org.jboss.webbeans.test.components.Lion;
import org.jboss.webbeans.test.components.Panther;
import org.jboss.webbeans.test.components.Puma;
import org.jboss.webbeans.test.components.Tiger;
import org.jboss.webbeans.test.beans.Bear;
import org.jboss.webbeans.test.beans.Cheetah;
import org.jboss.webbeans.test.beans.Cougar;
import org.jboss.webbeans.test.beans.Elephant;
import org.jboss.webbeans.test.beans.Giraffe;
import org.jboss.webbeans.test.beans.Leopard;
import org.jboss.webbeans.test.beans.Lion;
import org.jboss.webbeans.test.beans.Panther;
import org.jboss.webbeans.test.beans.Puma;
import org.jboss.webbeans.test.beans.Tiger;
import org.jboss.webbeans.util.Reflections;
import org.testng.annotations.Test;

public class EnterpriseComponentModelTest extends AbstractTest
public class EnterpriseBeanModelTest extends AbstractTest
{

@Test @SpecAssertion(section="2.7.2")
Expand Down Expand Up @@ -73,20 +73,16 @@ public void testStatelessWithRequestScope()
assert exception;
}

// TODO Need EJB3.1 @Test
@Test(groups="ejb3")
public void testSingleton()
{
//ComponentMetaModel<Lion> lion = new ComponentMetaModel<Lion>(new ClassAnnotatedItem(Lion.class), getEmptyAnnotatedItem(), manager);
//assert lion.getComponentType().equals(ComponentType.ENTERPRISE);
//assert lion.getScopeType().annotationType().equals(ApplicationScoped.class);
assert false;
}

// TODO Need EJB3.1 @Test
@Test(groups="ejb3")
public void testSingletonWithRequestScope()
{
//ComponentMetaModel<Lion> lion = new ComponentMetaModel<Lion>(new ClassAnnotatedItem(Lion.class), getEmptyAnnotatedItem(), manager);
//assert lion.getComponentType().equals(ComponentType.ENTERPRISE);
//assert lion.getScopeType().annotationType().equals(ApplicationScoped.class);
assert false;
}

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -143,7 +139,7 @@ public void testMultipleRemoveMethodsWithMultipleDestroys()

@SuppressWarnings("unchecked")
@Test
public void testNonStatefulEnterpriseComponentWithDestroys()
public void testNonStatefulEnterpriseBeanWithDestroys()
{
boolean exception = false;
try
Expand Down
Expand Up @@ -15,19 +15,19 @@
import org.jboss.webbeans.introspector.SimpleAnnotatedField;
import org.jboss.webbeans.model.bean.EventBeanModel;
import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
import org.jboss.webbeans.test.components.DangerCall;
import org.jboss.webbeans.test.beans.DangerCall;
import org.jboss.webbeans.test.mock.MockManagerImpl;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

/**
* Unit tests for the component model used only for the container supplied
* Event component.
* Unit tests for the bean model used only for the container supplied
* Event bean.
*
* @author David Allen
*
*/
public class EventComponentModelTest
public class EventBeanModelTest
{
private MockManagerImpl manager = null;
private EventBeanModel<EventImpl<DangerCall>> eventBeanModel = null;
Expand All @@ -49,7 +49,7 @@ public void before() throws Exception
}

/**
* The name should always be null since this type of component is not allowed to have a name.
* The name should always be null since this type of bean is not allowed to have a name.
*/
@Test(groups = "eventbus")
public void testName()
Expand Down
16 changes: 8 additions & 8 deletions webbeans-ri/src/test/java/org/jboss/webbeans/test/EventTest.java
Expand Up @@ -13,18 +13,18 @@
import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
import org.jboss.webbeans.test.annotations.Synchronous;
import org.jboss.webbeans.test.annotations.Tame;
import org.jboss.webbeans.test.beans.DangerCall;
import org.jboss.webbeans.test.bindings.AnimalStereotypeAnnotationLiteral;
import org.jboss.webbeans.test.bindings.FishStereotypeAnnotationLiteral;
import org.jboss.webbeans.test.bindings.SynchronousAnnotationLiteral;
import org.jboss.webbeans.test.bindings.TameAnnotationLiteral;
import org.jboss.webbeans.test.components.DangerCall;
import org.jboss.webbeans.test.mock.MockManagerImpl;
import org.jboss.webbeans.util.Reflections;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

/**
* Tests for the implementation of an Event component.
* Tests for the implementation of an Event bean
*
* @author David Allen
*
Expand Down Expand Up @@ -55,10 +55,10 @@ public void testFireEvent()
// Create a test annotation for the event and use it to construct the
// event object
Annotation[] annotations = new Annotation[] { new AnimalStereotypeAnnotationLiteral() };
EventImpl<DangerCall> eventComponent = new EventImpl<DangerCall>();
eventComponent.setEventBindings(annotations);
eventComponent.setManager(manager);
eventComponent.fire(anEvent, new TameAnnotationLiteral(),
EventImpl<DangerCall> eventBean = new EventImpl<DangerCall>();
eventBean.setEventBindings(annotations);
eventBean.setManager(manager);
eventBean.fire(anEvent, new TameAnnotationLiteral(),
new SynchronousAnnotationLiteral());
assert anEvent.equals(manager.getEvent());
assert Reflections.annotationSetMatches(manager.getEventBindings(),
Expand All @@ -69,7 +69,7 @@ public void testFireEvent()
boolean duplicateDetected = false;
try
{
eventComponent.fire(anEvent, new TameAnnotationLiteral(),
eventBean.fire(anEvent, new TameAnnotationLiteral(),
new TameAnnotationLiteral());
} catch (DuplicateBindingTypeException e)
{
Expand All @@ -81,7 +81,7 @@ public void testFireEvent()
boolean nonBindingTypeDetected = false;
try
{
eventComponent.fire(anEvent, new FishStereotypeAnnotationLiteral());
eventBean.fire(anEvent, new FishStereotypeAnnotationLiteral());
}
catch (IllegalArgumentException e)
{
Expand Down
Expand Up @@ -11,11 +11,11 @@
import org.jboss.webbeans.injectable.InjectableField;
import org.jboss.webbeans.introspector.SimpleAnnotatedType;
import org.jboss.webbeans.model.bean.SimpleBeanModel;
import org.jboss.webbeans.test.components.Cod;
import org.jboss.webbeans.test.components.FishFarm;
import org.jboss.webbeans.test.components.Salmon;
import org.jboss.webbeans.test.components.ScottishFish;
import org.jboss.webbeans.test.components.Sole;
import org.jboss.webbeans.test.beans.Cod;
import org.jboss.webbeans.test.beans.FishFarm;
import org.jboss.webbeans.test.beans.Salmon;
import org.jboss.webbeans.test.beans.ScottishFish;
import org.jboss.webbeans.test.beans.Sole;
import org.testng.annotations.Test;

public class InstantiationByNameTest extends AbstractTest
Expand Down

0 comments on commit 8599425

Please sign in to comment.