[webbeans-commits] Webbeans SVN: r1584 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Feb 18 18:57:27 EST 2009


Author: shane.bryzak at jboss.com
Date: 2009-02-18 18:57:27 -0500 (Wed, 18 Feb 2009)
New Revision: 1584

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java
Log:
mapped enterprise bean tests to assertions

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java	2009-02-18 23:44:50 UTC (rev 1583)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/enterprise/EnterpriseBeanDeclarationTest.java	2009-02-18 23:57:27 UTC (rev 1584)
@@ -7,171 +7,93 @@
 import org.testng.annotations.Test;
 
 /**
- * Sections
- * 
- * 3.3. Enterprise Web Beans 3.3.1. Which EJBs are enterprise Web Beans? 3.3.2.
- * API types of an enterprise Web Bean 3.3.3. Declaring an enterprise Web Bean
- * using annotations 3.3.4. Declaring an enterprise Web Bean using XML
- * 
  * @author Nicklas Karlsson
  * 
  * Spec version: PRD2
  */
 public class EnterpriseBeanDeclarationTest extends AbstractDeclarativeTest
 {
-
-   /**
-    * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
-    * If an enterprise Web Bean specifies an illegal scope, a
-    * DefinitionException is thrown by the Web Bean manager at initialization
-    * time
-    */
    @Test(groups = { "enterpriseBeans" })
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "b")
    public void testStatelessWithDependentScopeOK()
    {
       deployBeans(Giraffe.class);
    }
 
-   /**
-    * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
-    * If an enterprise Web Bean specifies an illegal scope, a
-    * DefinitionException is thrown by the Web Bean manager at initialization
-    * time
-    */
    @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "d")
    public void testStatelessWithRequestScopeFails()
    {
       deployBeans(Beagle_Broken.class);
    }
 
-   /**
-    * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
-    * If an enterprise Web Bean specifies an illegal scope, a
-    * DefinitionException is thrown by the Web Bean manager at initialization
-    * time
-    */
-
    @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "d")
    public void testStatelessWithConversationScopeFails()
    {
       deployBeans(Boxer_Broken.class);
    }
 
-   /**
-    * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
-    * If an enterprise Web Bean specifies an illegal scope, a
-    * DefinitionException is thrown by the Web Bean manager at initialization
-    * time
-    */
    @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "d")
    public void testStatelessWithSessionScopeFails()
    {
       deployBeans(Bullmastiff_Broken.class);
    }
 
-   /**
-    * An EJB stateless session bean must belong to the @Dependent pseudo-scope.
-    * If an enterprise Web Bean specifies an illegal scope, a
-    * DefinitionException is thrown by the Web Bean manager at initialization
-    * time
-    */
    @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "d")
    public void testStatelessWithApplicationScopeFails()
    {
       deployBeans(Dachshund_Broken.class);
    }
 
-   /**
-    * An EJB singleton bean must belong to either the @ApplicationScoped scope
-    * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
-    * illegal scope, a DefinitionException is thrown by the Web Bean manager at
-    * initialization time
-    */
    @Test(groups = { "enterpriseBeans" })
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "c")
    public void testSingletonWithDependentScopeOK()
    {
       deployBeans(Labrador.class);
    }
 
-   /**
-    * An EJB singleton bean must belong to either the @ApplicationScoped scope
-    * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
-    * illegal scope, a DefinitionException is thrown by the Web Bean manager at
-    * initialization time
-    */
    @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "d")
    public void testSingletonWithRequestScopeFails()
    {
       deployBeans(Greyhound_Broken.class);
       assert false;
    }
 
-   /**
-    * An EJB singleton bean must belong to either the @ApplicationScoped scope
-    * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
-    * illegal scope, a DefinitionException is thrown by the Web Bean manager at
-    * initialization time
-    */
    @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "d")
    public void testSingletonWithConversationScopeFails()
    {
       deployBeans(Husky_Broken.class);
       assert false;
    }
 
-   /**
-    * An EJB singleton bean must belong to either the @ApplicationScoped scope
-    * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
-    * illegal scope, a DefinitionException is thrown by the Web Bean manager at
-    * initialization time
-    */
    @Test(groups = { "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "")
    public void testSingletonWithSessionScopeFails()
    {
       deployBeans(IrishTerrier_Broken.class);
    }
 
-   /**
-    * An EJB singleton bean must belong to either the @ApplicationScoped scope
-    * or to the @Dependent pseudo-scope. If an enterprise Web Bean specifies an
-    * illegal scope, a DefinitionException is thrown by the Web Bean manager at
-    * initialization time
-    */
    @Test(groups = { "enterpriseBeans" })
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "c")
    public void testSingletonWithApplicationScopeOK()
    {
       deployBeans(Laika.class);
    }
 
-   /**
-    * If the implementation class of an enterprise Web Bean is annotated @Interceptor
-    * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
-    * initialization time.
-    */
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "f")
    public void testEnterpriseBeanInterceptorFails()
    {
       deployBeans(Pug_Broken.class);
    }
 
-   /**
-    * If the implementation class of an enterprise Web Bean is annotated @Interceptor
-    * or @Decorator, a DefinitionException is thrown by the Web Bean manager at
-    * initialization time.
-    */
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "g")
    public void testEnterpriseBeanDecoratorFails()
    {
       deployBeans(Pekingese_Broken.class);
@@ -182,112 +104,75 @@
     * annotations.
     */
    @Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans", "stub" })
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "review")
    public void testMultipleAnnotationDefinedEnterpriseBeansWithSameImplementationClassFails()
    {
       // TODO: testable?
       assert false;
    }
 
-   /**
-    * Note that multiple enterprise Web Beans may share the same implementation
-    * class. This occurs when Web Beans are defined using XML
-    */
    @Test(groups = { "webbeansxml", "enterpriseBeans", "stub" })
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "e")
    public void testMultipleXMLDefinedEnterpriseBeansWithSameImplementationClassOK()
    {
       assert false;
    }
 
-   /**
-    * All session beans exposing an EJB 3.x client view and declared via an EJB
-    * component defining annotation on the EJB bean class are Web Beans, and
-    * thus no special declaration is required.
-    */
    @Test(groups = { "enterpriseBeans", "stub" })
-   @SpecAssertion(section = "3.3.2", id = "unknown")
+   @SpecAssertion(section = "3.3.2", id = "a")
    public void testAnnotatedEnterpriseBean()
    {
       // TODO: dupe?
       assert false;
    }
 
-   /**
-    * Additional enterprise Web Beans for these EJBs may be defined using XML,
-    * by specifying the bean class in web-beans.xml.
-    */
    @Test(groups = { "enterpriseBeans", "webbeansxml", "stub" })
-   @SpecAssertion(section = "3.3.2", id = "unknown")
+   @SpecAssertion(section = "3.3.2", id = "a")
    public void testAnnotatedEnterpriseBeanComplementedWithXML()
    {
       // TODO dupe?
       assert false;
    }
 
-   /**
-    * All session beans exposing an EJB 3.x client view and declared in
-    * ejb-jar.xml are also Web Beans.
-    */
    @Test(groups = { "enterpriseBeans", "ejbjarxml", "stub" })
-   @SpecAssertion(section = "3.3.2", id = "unknown")
+   @SpecAssertion(section = "3.3.2", id = "b")
    public void testEJBJARDefinedEnterpriseBean()
    {
       // TODO dupe?
       assert false;
    }
 
-   /**
-    * Additional enterprise Web Beans for these EJBs may be defined using XML,
-    * by specifying the bean class and EJB name in web-beans.xml
-    */
    @Test(groups = { "enterpriseBeans", "ejbjarxml", "webbeansxml", "stub" })
-   @SpecAssertion(section = "3.3.2", id = "unknown")
+   @SpecAssertion(section = "3.3.2", id = "b")
    public void testEJBJARDefinedEnterpriseBeanComplementedWithXML()
    {
       // TODO dupe?
       assert false;
    }
 
-   /**
-    * The set of API types for an enterprise Web Bean contains all local
-    * interfaces of the bean that do not have wildcard type parameters or type
-    * variables and their superinterfaces
-    */
    @Test(groups = { "enterpriseBeans", "stub" })
-   @SpecAssertion(section = "3.3.3", id = "unknown")
-   public void testAPITypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
+   @SpecAssertion(section = "3.3.3", id = "a")
+   public void testBeanTypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
    {
       assert false;
    }
 
-   /**
-    * If the EJB bean has a bean class local view and the bean class is not a
-    * parameterized type, the set of API types contains the bean class and all
-    * superclasses
-    */
    @Test(groups = { "enterpriseBeans", "stub" })
-   @SpecAssertion(section = "3.3.3", id = "unknown")
-   public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInAPITypes()
+   @SpecAssertion(section = "3.3.3", id = "b")
+   public void testEnterpriseBeanWithLocalViewAndParameterizedTypeIncludesBeanClassAndSuperclassesInBeanTypes()
    {
       assert false;
    }
 
-   /**
-    * In addition, java.lang.Object is an API type of every enterprise Web Bean.
-    */
    @Test(groups = "enterpriseBeans")
-   @SpecAssertion(section = "3.3.3", id = "unknown")
+   @SpecAssertion(section = "3.3.3", id = "c")
    public void testObjectIsInAPITypes()
    {
       assert createEnterpriseBean(Laika.class).getTypes().contains(Object.class);
    }
 
-   /**
-    * Remote interfaces are not included in the set of API types.
-    */
    @Test(groups = { "enterpriseBeans", "stub" })
-   @SpecAssertion(section = "3.3.3", id = "unknown")
+   @SpecAssertion(section = "3.3.3", id = "d")
    public void testRemoteInterfacesAreNotInAPITypes()
    {
       assert false;
@@ -300,7 +185,7 @@
     * attribute declares the EJB name of an EJB defined in ejb-jar.xml
     */
    @Test(groups = { "enterpriseBeans", "webbeansxml", "ejbjarxml", "stub" })
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "review")
    public void testXMLFilesEJBNameUsage()
    {
       assert false;
@@ -312,19 +197,14 @@
     * thrown by the Web Bean manager at initialization time.
     */
    @Test(expectedExceptions = DefinitionException.class, groups = { "enterpriseBeans" })
-   @SpecAssertion(section = "3.3", id = "unknown")
+   @SpecAssertion(section = "3.3", id = "review")
    public void testMessageDrivenBeansNotOK()
    {
       deployBeans(Leopard.class);
    }
 
-   /**
-    * The default name for an enterprise Web Bean is the unqualified class name
-    * of the Web Bean implementation class, after converting the first character
-    * to lower case.
-    */
    @Test(groups = "enterpriseBeans")
-   @SpecAssertion(section = "3.3.8", id = "unknown")
+   @SpecAssertion(section = "3.3.8", id = "a")
    public void testDefaultName()
    {
       assert createEnterpriseBean(Pitbull.class).getName().equals("pitbull");




More information about the weld-commits mailing list