[webbeans-commits] Webbeans SVN: r1003 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Jan 15 21:34:54 EST 2009


Author: shane.bryzak at jboss.com
Date: 2009-01-15 21:34:53 -0500 (Thu, 15 Jan 2009)
New Revision: 1003

Removed:
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BeanDeploymentTest.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentTypeTest.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InitializerMethodTest.java
Log:
ported to tck

Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BeanDeploymentTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BeanDeploymentTest.java	2009-01-16 02:34:45 UTC (rev 1002)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BeanDeploymentTest.java	2009-01-16 02:34:53 UTC (rev 1003)
@@ -1,108 +0,0 @@
-package org.jboss.webbeans.test;
-
-import org.testng.annotations.Test;
-
- at SpecVersion("20081222")
-public class BeanDeploymentTest
-{
-
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
-   public void testOnlySpecializedSimpleBeanDeployed()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
-   public void testSpecializedSimpleBeanExtends()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
-   public void testSpecializedSimpleBeanHasSameBindingAnnotations()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.2.6")
-   public void testSpecializedSimpleBeanHasSameName()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
-   public void testOnlySpecializedEnterpriseBeanDeployed()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
-   public void testSpecializedEnterpriseBeanExtends()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
-   public void testSpecializedEnterpriseBeanHasSameBindingAnnotations()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
-   public void testSpecializedEnterpriseBeanHasSameName()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
-   public void testSpecializedEnterpriseBeanAllLocalInterfaces()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.6")
-   public void testSpecializedEnterpriseBeanSupportsBeanClassLocalView()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
-   public void testOnlySpecializedProducerMethodBeanDeployed()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
-   public void testSpecializedProducerMethodBeanDirectlyOverrides()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
-   public void testSpecializedProducerMethodBeanHasSameBindingAnnotations()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-   @Test(groups={"stub", "specialization"}) @SpecAssertion(section="3.3.3")
-   public void testSpecializedProducerMethodBeanHasSameName()
-   {
-      // TODO Placeholder
-      assert false;
-   }
-   
-}

Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentTypeTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentTypeTest.java	2009-01-16 02:34:45 UTC (rev 1002)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/DeploymentTypeTest.java	2009-01-16 02:34:53 UTC (rev 1003)
@@ -1,145 +0,0 @@
-package org.jboss.webbeans.test;
-
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.DeploymentException;
-import javax.webbeans.Production;
-import javax.webbeans.Standard;
-import javax.webbeans.UnsatisfiedDependencyException;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.bean.ProducerMethodBean;
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
-import org.jboss.webbeans.test.annotations.HornedAnimalDeploymentType;
-import org.jboss.webbeans.test.beans.BlackWidow;
-import org.jboss.webbeans.test.beans.RedSnapper;
-import org.jboss.webbeans.test.beans.Reindeer;
-import org.jboss.webbeans.test.beans.Rhinoceros;
-import org.jboss.webbeans.test.beans.SpiderProducer;
-import org.jboss.webbeans.test.beans.broken.BeanWithTooManyDeploymentTypes;
-import org.jboss.webbeans.test.beans.broken.Gazelle;
-import org.testng.annotations.Test;
-
- at SpecVersion("20081206")
-public class DeploymentTypeTest extends AbstractTest
-{
-   
-   @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.5.1")
-   public void testNonBuiltInComponentUsesStandard()
-   {
-      SimpleBean.of(Gazelle.class, manager);
-   }
-   
-   @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
-   public void testDeploymentTypeHasCorrectTarget()
-   {
-      assert false;
-   }
-
-   @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
-   public void testDeploymentTypeHasCorrectRetention()
-   {
-      assert false;
-   }
-
-   @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.5.2")
-   public void testDeploymentTypeDeclaresScopeTypeAnnotation()
-   {
-      assert false;
-   }
-   
-   @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="2.5.3")
-   public void testTooManyDeploymentTypes()
-   {
-      SimpleBean.of(BeanWithTooManyDeploymentTypes.class, manager);
-   }
-   
-   @Test @SpecAssertion(section="2.5.3")
-   public void testDeploymentTypeInhertitedFromDeclaringBean() throws Exception
-   {
-      SimpleBean<SpiderProducer> bean = SimpleBean.of(SpiderProducer.class, manager);
-      manager.addBean(bean);
-      Method method = SpiderProducer.class.getMethod("produceBlackWidow");
-      ProducerMethodBean<BlackWidow> blackWidowSpiderModel = ProducerMethodBean.of(method, bean, manager);
-      assert blackWidowSpiderModel.getDeploymentType().equals(AnotherDeploymentType.class);
-   }
-   
-   @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.4")
-   public void testXmlDeploymentTypeOverridesJava()
-   {
-      //Map<Class<? extends Annotation>, Annotation> xmlDefinedDeploymentTypeAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();
-      //xmlDefinedDeploymentTypeAnnotations.put(AnotherDeploymentType.class, new AnotherDeploymentTypeAnnotationLiteral());
-      //AnnotatedClass<BeanWithTooManyDeploymentTypes> xmlDefinedDeploymentTypeAnnotatedItem = new SimpleAnnotatedClass<BeanWithTooManyDeploymentTypes>(BeanWithTooManyDeploymentTypes.class, xmlDefinedDeploymentTypeAnnotations);
-      
-      //SimpleBean<BeanWithTooManyDeploymentTypes> model = createSimpleBean(BeanWithTooManyDeploymentTypes.class, xmlDefinedDeploymentTypeAnnotatedItem, manager);
-      //assert model.getDeploymentType().equals(AnotherDeploymentType.class);
-      assert false;
-   }
-   
-
-   
-   @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.4")
-   public void testXmlRespectsJavaDeploymentType()
-   {
-      //AnnotatedClass<Tuna> annotatedItem = new SimpleAnnotatedClass<Tuna>(Tuna.class, new HashMap<Class<? extends Annotation>, Annotation>());
-      //SimpleBean<Tuna> tuna = createSimpleBean(Tuna.class, annotatedItem, manager);
-      //assert tuna.getDeploymentType().equals(AnotherDeploymentType.class);
-      assert false;
-   }
-   
-   @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.5.5")
-   public void testXmlDefaultDeploymentType()
-   {
-      //AnnotatedClass<Antelope> antelopeAnnotatedItem = new SimpleAnnotatedClass<Antelope>(Antelope.class, new HashMap<Class<? extends Annotation>, Annotation>());
-      //SimpleBean<Antelope> antelope = createSimpleBean(Antelope.class, antelopeAnnotatedItem, manager);
-      // assert antelope.getDeploymentType().equals(Production.class);
-      assert false;
-   }
-   
-   @Test @SpecAssertion(section="2.5.5")
-   public void testHighestPrecedenceDeploymentTypeFromStereotype()
-   {
-      Bean<?> bean = SimpleBean.of(Rhinoceros.class, manager);
-      assert bean.getDeploymentType().equals(HornedAnimalDeploymentType.class);
-   }
-   
-   @Test(groups="beanLifecycle", expectedExceptions=UnsatisfiedDependencyException.class) @SpecAssertion(section="2.5.6")
-   public void testBeanWithDisabledDeploymentTypeNotInstantiated()
-   {
-      manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
-      registerBean(RedSnapper.class);
-      manager.getInstanceByType(RedSnapper.class);
-   }
-
-   @Test @SpecAssertion(section={"2.5.6", "2.5.7"})
-   public void testCustomDeploymentTypes()
-   {
-      manager.setEnabledDeploymentTypes(Arrays.asList(Standard.class, AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
-      assert manager.getEnabledDeploymentTypes().size() == 3;
-      assert manager.getEnabledDeploymentTypes().get(0).equals(Standard.class);
-      assert manager.getEnabledDeploymentTypes().get(1).equals(AnotherDeploymentType.class);
-      assert manager.getEnabledDeploymentTypes().get(2).equals(HornedAnimalDeploymentType.class);
-   }
-   
-   @Test(expectedExceptions=DeploymentException.class) @SpecAssertion(section="2.5.6")
-   public void testStandardMustBeDeclared()
-   {
-      manager.setEnabledDeploymentTypes(Arrays.asList(AnotherDeploymentType.class, HornedAnimalDeploymentType.class));
-   }
-   
-   @Test(groups={"stub", "webbeansxml"}, expectedExceptions=DeploymentException.class) @SpecAssertion(section="2.5.6")
-   public void testMultipleDeployElementsCannotBeDefined()
-   {
-      
-   }
-   
-   @Test @SpecAssertion(section={"2.5.5", "2.7.2"})
-   public void testWebBeanDeploymentTypeOverridesStereotype()
-   {
-      Bean<Reindeer> bean = SimpleBean.of(Reindeer.class, manager);
-      assert bean.getDeploymentType().equals(Production.class);
-   }
-}

Deleted: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InitializerMethodTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InitializerMethodTest.java	2009-01-16 02:34:45 UTC (rev 1002)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InitializerMethodTest.java	2009-01-16 02:34:53 UTC (rev 1003)
@@ -1,134 +0,0 @@
-package org.jboss.webbeans.test;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.NonexistentMethodException;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.bean.SimpleBean;
-import org.jboss.webbeans.test.beans.Chicken;
-import org.jboss.webbeans.test.beans.ChickenHutch;
-import org.jboss.webbeans.test.beans.Fox;
-import org.jboss.webbeans.test.beans.broken.Capercaillie;
-import org.jboss.webbeans.test.beans.broken.Dottrel;
-import org.jboss.webbeans.test.beans.broken.Grouse;
-import org.jboss.webbeans.test.beans.broken.Pheasant;
-import org.jboss.webbeans.test.beans.broken.Shrike;
-import org.testng.annotations.Test;
-
- at SpecVersion("20081206")
-public class InitializerMethodTest extends AbstractTest
-{
-   
-   @Test(expectedExceptions=DefinitionException.class, groups="initializerMethod") @SpecAssertion(section="3.8")
-   public void testStaticInitializerMethodNotAllowed()
-   {
-      SimpleBean.of(Dottrel.class, manager);
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "servlet"}) @SpecAssertion(section="3.8")
-   public void testInitializerMethodCalledOnServlet()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "ejb3"}) @SpecAssertion(section="3.8")
-   public void testInitializerMethodCalledOnEJBSessionBean()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "ejb3"}) @SpecAssertion(section="3.8")
-   public void testInitializerMethodCalledOnEJBMDB()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "ejb3", "singletons"}) @SpecAssertion(section="3.8")
-   public void testInitializerMethodCalledOnEJBSingleton()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "ejb3"}) @SpecAssertion(section="3.8")
-   public void testInitializerMethodNotABusinessMethod()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "interceptors"}) @SpecAssertion(section="3.8")
-   public void testMethodInterceptorNotCalledOnInitializerMethod()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"initializerMethod"}) @SpecAssertion(section={"3.8", "5.3", "3.8.2", "3.8.3"})
-   public void testMultipleInitializerMethodsAreCalled()
-   {
-      manager.addBean(SimpleBean.of(Fox.class, manager));
-      manager.addBean(SimpleBean.of(Chicken.class, manager));
-      
-      Bean<ChickenHutch> chickenHutchBean = SimpleBean.of(ChickenHutch.class, manager);
-      ChickenHutch chickenHutch = chickenHutchBean.create();
-      assert chickenHutch.fox != null;
-      assert chickenHutch.chicken != null;
-   }
-   
-   @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section={"3.8.1", "3.4.2"})
-   public void testInitializerMethodAnnotatedProduces()
-   {
-      SimpleBean.of(Pheasant.class, manager);
-   }
-   
-   @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.8.1")
-   public void testInitializerMethodAnnotatedDestructor()
-   {
-      SimpleBean.of(Shrike.class, manager);
-   }
-   
-   @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.8.1")
-   public void testInitializerMethodHasParameterAnnotatedDisposes()
-   {
-      SimpleBean.of(Capercaillie.class, manager);
-   }
-   
-   @Test(groups="initializerMethod", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.8.1")
-   public void testInitializerMethodHasParameterAnnotatedObserves()
-   {
-      SimpleBean.of(Grouse.class, manager);
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "webbeansxml"}) @SpecAssertion(section="3.8.2")
-   public void testInitializerMethodDeclaredInXml()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "webbeansxml"}) @SpecAssertion(section="3.8.2")
-   public void testInitializerMethodDeclaredInXmlIgnoresBindingAnnotationsInJava()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "webbeansxml"}, expectedExceptions=NonexistentMethodException.class) @SpecAssertion(section="3.8.2")
-   public void testInitializerMethodDeclaredInXmlDoesNotExist()
-   {
-      assert false;
-   }
-   
-   @Test(groups={"stub", "initializerMethod", "webbeansxml"}) @SpecAssertion(section="3.8.2")
-   public void testBeanHasAllInitializerMethodsDeclaredInJavaAndXml()
-   {
-      assert false;
-   }
-   
-   /*
-
-   @Test(groups="initializerMethod") @SpecAssertion(section="3.8")
-   public void test
-   {
-      assert false;
-   }
-
-    */
-   
-}




More information about the weld-commits mailing list