[webbeans-commits] Webbeans SVN: r1581 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/definition/stereotype and 2 other directories.

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


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

Modified:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/stereotype/StereotypeDefinitionTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
matched context, stereotype and producer method tests to assertions

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java	2009-02-18 22:27:45 UTC (rev 1580)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java	2009-02-18 22:57:51 UTC (rev 1581)
@@ -54,7 +54,7 @@
    }
 
    @Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
-   @SpecAssertion(section = "8.5", id = "unknown")
+   @SpecAssertion(section = "8.5", id = "review")
    public void testGetContextWithNoActiveContextsFails()
    {
       getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getRequestContext());
@@ -62,7 +62,7 @@
    }
 
    @Test(expectedExceptions = { IllegalArgumentException.class }, groups = { "manager" })
-   @SpecAssertion(section = "8.5", id = "unknown")
+   @SpecAssertion(section = "8.5", id = "review")
    public void testGetContextWithTooManyActiveContextsFails()
    {
       Context firstContext = new DummyContext()
@@ -77,14 +77,14 @@
    }
 
    @Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
-   @SpecAssertion(section = "8.5", id = "unknown")
+   @SpecAssertion(section = "8.5", id = "review")
    public void testGetContextWithNoRegisteredContextsFails()
    {
       getCurrentManager().getContext(Unregistered.class);
    }
 
    @Test(groups = { "manager" })
-   @SpecAssertion(section = "8.5", id = "unknown")
+   @SpecAssertion(section = "8.5", id = "review")
    public void testGetContextReturnsActiveContext()
    {
       getCurrentManager().getContext(RequestScoped.class);

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/stereotype/StereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/stereotype/StereotypeDefinitionTest.java	2009-02-18 22:27:45 UTC (rev 1580)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/stereotype/StereotypeDefinitionTest.java	2009-02-18 22:57:51 UTC (rev 1581)
@@ -37,7 +37,7 @@
     * here
     */
    @Test(groups = { "underInvestigation", "annotationDefinition" })
-   @SpecAssertion(section = "2.7.1", id = "unknown")
+   @SpecAssertion(section = "2.7.1", id = "a")
    public void testHasCorrectTarget()
    {
       assert false;
@@ -48,7 +48,7 @@
     * here
     */
    @Test(groups = { "underInvestigation", "annotationDefinition" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "2.7.1", id = "unknown")
+   @SpecAssertion(section = "2.7.1", id = "a")
    public void testHasCorrectRetention()
    {
       assert false;
@@ -59,14 +59,14 @@
     * isn't one and is difficult to test
     */
    @Test(groups = { "underInvestigation", "annotationDefinition" })
-   @SpecAssertion(section = "2.7.1", id = "unknown")
+   @SpecAssertion(section = "2.7.1", id = "b")
    public void testHasStereotypeAnnotation()
    {
       assert false;
    }
 
    @Test
-   @SpecAssertion(section = "2.7.1.1", id = "unknown")
+   @SpecAssertion(section = "2.7.1.1", id = "a")
    public void testStereotypeWithScopeType()
    {
       Bean<Moose> moose = createSimpleBean(Moose.class);
@@ -74,7 +74,7 @@
    }
 
    @Test
-   @SpecAssertion(section = "2.7.1.1", id = "unknown")
+   @SpecAssertion(section = "2.7.1.1", id = "a")
    public void testStereotypeWithoutScopeType()
    {
       Bean<Reindeer> reindeer = createSimpleBean(Reindeer.class);
@@ -82,7 +82,7 @@
    }
 
    @Test( groups = "broken" )
-   @SpecAssertion(section = "2.7.1.2", id = "unknown")
+   @SpecAssertion(section = "2.7.1.2", id = "a")
    public void testStereotypeWithoutInterceptors()
    {
       deployBeans(Goldfish.class);
@@ -91,42 +91,43 @@
    }
 
    @Test(groups = { "stub", "interceptors" })
-   @SpecAssertion(section = "2.7.1.2", id = "unknown")
+   @SpecAssertion(section = "2.7.1.2", id = "b")
    public void testStereotypeWithInterceptors()
    {
       assert false;
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "2.7.1.1", id = "unknown")
+   @SpecAssertion(section = "2.7.1.1", id = "a")
    public void testStereotypeWithTooManyScopeTypes()
    {
       deployBeans(Elk_Broken.class);
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "2.7.1.1", id = "unknown")
+   @SpecAssertion(section = "2.7.1.1", id = "b")
    public void testStereotypeWithTooManyDeploymentTypes()
    {
       deployBeans(Gazelle_Broken.class);
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "2.7.1.3", id = "unknown")
+   @SpecAssertion(section = "2.7.1.3", id = "a")
    public void testStereotypeWithNonEmptyNamed()
    {
       deployBeans(FallowDeer_Broken.class);
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "2.7.1", id = "unknown")
+   @SpecAssertion(section = "2.7.1", id = "d")
    public void testStereotypeWithBindingTypes()
    {
       deployBeans(RoeDeer_Broken.class);
    }
 
    @Test
-   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), 
+      @SpecAssertion(section = "2.7.4", id = "c") })
    public void testMultipleStereotypes()
    {
       Bean<HighlandCow> highlandCow = createSimpleBean(HighlandCow.class);
@@ -137,7 +138,8 @@
    }
 
    @Test
-   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), 
+      @SpecAssertion(section = "2.7.4", id = "c") })
    public void testMultipleStereotypesMergesScopes()
    {
       Bean<Springbok> springbok = createSimpleBean(Springbok.class);
@@ -145,28 +147,31 @@
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), 
+      @SpecAssertion(section = "2.7.4", id = "c") })
    public void testMultipleStereotypesMergesRequiredTypes()
    {
       deployBeans(Antelope_Broken.class);
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), 
+      @SpecAssertion(section = "2.7.4", id = "c") })
    public void testMultipleStereotypesWithMultipleDeploymentTypes()
    {
       deployBeans(Goat_Broken.class);
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"), 
+      @SpecAssertion(section = "2.7.4", id = "c") })
    public void testMultipleStereotypesWithMultipleScopeTypes()
    {
       deployBeans(Deer_Broken.class);
    }
 
    @Test(groups = { "stub", "webbeansxml" })
-   @SpecAssertion(section = "2.7.3", id = "unknown")
+   @SpecAssertion(section = "2.7.3", id = "a")
    public void testStereotypeDeclaredInXmlIgnoresJavaStereotypes()
    {
       // Map<Class<? extends Annotation>, Annotation> cooXmlAnnotations = new
@@ -190,7 +195,7 @@
    }
 
    @Test(groups = { "stub", "webbeansxml" })
-   @SpecAssertion(section = "2.7.3", id = "unknown")
+   @SpecAssertion(section = "2.7.3", id = "a")
    public void testStereotypeDeclaredInXmlIgnoresJavaBindingTypes()
    {
       // Map<Class<? extends Annotation>, Annotation> cooXmlAnnotations = new
@@ -213,42 +218,46 @@
    }
 
    @Test
-   @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "b"), 
+      @SpecAssertion(section = "2.7.4", id = "a") })
    public void testRequiredTypeIsImplemented()
    {
       assert createSimpleBean(HighlandCow.class).getTypes().contains(Animal.class);
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "b"), 
+      @SpecAssertion(section = "2.7.4", id = "a") })
    public void testRequiredTypeIsNotImplemented()
    {
       deployBeans(Chair_Broken.class);
    }
 
    @Test
-   @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "a"), 
+      @SpecAssertion(section = "2.7.4", id = "b") })
    public void testScopeIsSupported()
    {
       assert createSimpleBean(Goldfish.class).getScopeType().equals(RequestScoped.class);
    }
 
    @Test(expectedExceptions = DefinitionException.class)
-   @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "a"), 
+      @SpecAssertion(section = "2.7.4", id = "b") })
    public void testScopeIsNotSupported()
    {
       createSimpleBean(Carp_Broken.class);
    }
 
    @Test
-   @SpecAssertion(section = "4.1", id = "unknown")
+   @SpecAssertion(section = "4.1", id = "a")
    public void testStereotypeDeclaredInheritedIsInherited() throws Exception
    {
       assert createSimpleBean(BorderCollie.class).getScopeType().equals(RequestScoped.class);
    }
 
    @Test
-   @SpecAssertion(section = "4.1", id = "unknown")
+   @SpecAssertion(section = "4.1", id = "a")
    public void testStereotypeNotDeclaredInheritedIsNotInherited()
    {
       assert createSimpleBean(ShetlandPony.class).getDeploymentType().equals(Production.class);

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java	2009-02-18 22:27:45 UTC (rev 1580)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java	2009-02-18 22:57:51 UTC (rev 1581)
@@ -22,7 +22,7 @@
 {
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "2.5.3", id = "unknown")
+   @SpecAssertion(section = "2.5.3", id = "g")
    public void testProducerMethodInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -33,7 +33,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4", id = "unknown")
+   @SpecAssertion(section = "3.4", id = "b")
    public void testStaticMethod() throws Exception
    {
       Bean<BeanWithStaticProducerMethod> bean = createSimpleBean(BeanWithStaticProducerMethod.class);
@@ -43,14 +43,14 @@
    }
 
    @Test(groups = { "stub", "producerMethod", "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.4", id = "unknown")
+   @SpecAssertion(section = "3.4", id = "review")
    public void testProducerMethodIsNotBusinessMethod() throws Exception
    {
       assert false;
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4", id = "unknown")
+   @SpecAssertion(section = "3.4", id = "g")
    public void testParameterizedReturnType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -60,7 +60,7 @@
    }
 
    @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.4", id = "unknown")
+   @SpecAssertion(section = "3.4", id = "h")
    public void testParameterizedReturnTypeWithWildcard() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -70,7 +70,7 @@
    }
 
    @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.4", id = "unknown")
+   @SpecAssertion(section = "3.4", id = "g")
    public void testParameterizedReturnTypeWithTypeParameter() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -80,7 +80,8 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertions( { @SpecAssertion(section = "3.4", id = "unknown"), @SpecAssertion(section = "2.3.1", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "3.4", id = "b"), 
+      @SpecAssertion(section = "2.3.1", id = "a") })
    public void testDefaultBindingType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -92,7 +93,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4.1", id = "unknown")
+   @SpecAssertion(section = "3.4.1", id = "c")
    public void testApiTypeForClassReturn() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -109,7 +110,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4.1", id = "unknown")
+   @SpecAssertion(section = "3.4.1", id = "a")
    public void testApiTypeForInterfaceReturn() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -122,7 +123,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4.1", id = "unknown")
+   @SpecAssertion(section = "3.4.1", id = "b")
    public void testApiTypeForPrimitiveReturn() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -135,7 +136,8 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertions( { @SpecAssertion(section = "3.4.1", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "3.4.1", id = "b"), 
+      @SpecAssertion(section = "2.2", id = "unknown") })
    public void testApiTypeForArrayTypeReturn() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -148,7 +150,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4.2", id = "unknown")
+   @SpecAssertion(section = "3.4.2", id = "be")
    public void testBindingType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -160,7 +162,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4.2", id = "unknown")
+   @SpecAssertion(section = "3.4.2", id = "ba")
    public void testScopeType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -173,7 +175,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4.2", id = "unknown")
+   @SpecAssertion(section = "3.4.2", id = "bc")
    public void testDeploymentType() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -184,7 +186,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4.2", id = "unknown")
+   @SpecAssertion(section = "3.4.2", id = "bb")
    public void testNamedMethod() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -195,7 +197,7 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertion(section = "3.4.2", id = "unknown")
+   @SpecAssertion(section = "3.4.2", id = "bb")
    public void testDefaultNamedMethod() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -206,7 +208,7 @@
    }
 
    @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.4", id = "unknown")
+   @SpecAssertion(section = "3.4", id = "review")
    public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception
    {
       Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -216,7 +218,7 @@
    }
 
    @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
-   @SpecAssertion(section = "3.4", id = "unknown")
+   @SpecAssertion(section = "3.4", id = "review")
    public void testProducerMethodWithParameterAnnotatedObserves() throws Exception
    {
       Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -226,7 +228,9 @@
    }
 
    @Test(groups = "producerMethod")
-   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "3.4.2", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "b"), 
+      @SpecAssertion(section = "3.4.2", id = "ba"), 
+      @SpecAssertion(section = "2.2", id = "review") })
    public void testStereotypeSpecifiesScope() throws Exception
    {
       Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -241,7 +245,9 @@
    }
 
    @Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
-   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "3.4.2", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
+   @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "b"), 
+      @SpecAssertion(section = "3.4.2", id = "bc"), 
+      @SpecAssertion(section = "2.2", id = "review") })
    public void testStereotypeEnforcesTypes() throws Exception
    {
       Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -251,7 +257,7 @@
    }
 
    @Test
-   @SpecAssertion(section = "4.2", id = "unknown")
+   @SpecAssertion(section = "4.2", id = "d")
    public void testNonStaticProducerMethodNotInherited()
    {
       deployBeans(InfertileChicken.class);

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-18 22:27:45 UTC (rev 1580)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-02-18 22:57:51 UTC (rev 1581)
@@ -1112,10 +1112,26 @@
       <text>A producer method may be declared by annotating a method with the @javax.inject.Produces annotation</text>
     </assertion>
     
-    <assertion id="b">
-      <text>A producer method may also specify scope, name, deployment type, stereotypes and/or bindings</text>
+    <assertion id="ba">
+      <text>A producer method may specify a scope</text>
     </assertion>
     
+    <assertion id="bb">
+      <text>A producer method may specify a name</text>
+    </assertion>
+    
+    <assertion id="bc">
+      <text>A producer method may specify a deployment type</text>
+    </assertion>
+    
+    <assertion id="bd">
+      <text>A producer method may specify stereotypes</text>
+    </assertion>
+    
+    <assertion id="be">
+      <text>A producer method may specify a binding type</text>
+    </assertion>
+    
     <assertion id="c">
       <text>If a producer method is annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
     </assertion>




More information about the weld-commits mailing list