[webbeans-commits] Webbeans SVN: r2342 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml and 5 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Apr 8 04:55:15 EDT 2009


Author: vitold
Date: 2009-04-08 04:55:15 -0400 (Wed, 08 Apr 2009)
New Revision: 2342

Added:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnnotationTypesTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/AnotherTestInterceptorBindingType.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestBindingType.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestDeploymentType.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestInterceptorBindingType.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestNamed.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestScopeType.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestStereotype.java
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/
   tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml
Modified:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParser.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/metadata/XmlBasedMetadataTest.java
Log:
make some tests for 9.4

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParser.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParser.java	2009-04-08 00:20:36 UTC (rev 2341)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/xml/XmlParser.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -200,7 +200,8 @@
       {
          Element child = (Element)elIterator.next();
          Class<? extends Annotation> clazz = ParseXmlHelper.loadAnnotationClass(child, Annotation.class, environment, packagesMap);
-         if(!clazz.isAnnotationPresent(InterceptorBindingType.class))
+         if(!child.getName().equalsIgnoreCase(XmlConstants.INTERCEPTOR_BINDING_TYPE) && 
+               !clazz.isAnnotationPresent(InterceptorBindingType.class))
             throw new DefinitionException("Direct child <" + child.getName() + "> of interceptor binding type <" + element.getName() + 
                   "> declaration must be interceptor binding type");
          
@@ -214,11 +215,12 @@
       {
          Element stereotypeChild = (Element)elIterator.next();
          Class<? extends Annotation> stereotypeClass = ParseXmlHelper.loadAnnotationClass(stereotypeChild, Annotation.class, environment, packagesMap);
-         if(stereotypeClass.isAnnotationPresent(ScopeType.class) || 
+         if(stereotypeChild.getName().equalsIgnoreCase(XmlConstants.STEREOTYPE) || 
+               stereotypeClass.isAnnotationPresent(ScopeType.class) || 
                stereotypeClass.isAnnotationPresent(DeploymentType.class) || 
                stereotypeClass.isAnnotationPresent(InterceptorBindingType.class) || 
                stereotypeClass.isAnnotationPresent(Named.class))
-            return;
+            continue;
          throw new DefinitionException("Direct child <" + stereotypeChild.getName() + "> of stereotype <" + stereotypeElement.getName() + 
                "> declaration must be scope type, or deployment type, or interceptor binding type, or javax.annotation.Named");
          

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnnotationTypesTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnnotationTypesTest.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/AnnotationTypesTest.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,39 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestBindingType;
+import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestInterceptorBindingType;
+import org.jboss.jsr299.tck.tests.xml.annotationtypes.foo.TestStereotype;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+ at Artifact
+ at Classes({TestBindingType.class, TestInterceptorBindingType.class, TestStereotype.class})
+ at BeansXml("beans.xml")
+public class AnnotationTypesTest extends AbstractJSR299Test
+{
+   @Test
+   @SpecAssertions({
+      @SpecAssertion(section="9.4", id="a"),
+      @SpecAssertion(section="9.4", id="b"),
+      @SpecAssertion(section="9.4", id="c"),
+      @SpecAssertion(section="9.4", id="e"),
+      @SpecAssertion(section="9.4", id="f"),
+      @SpecAssertion(section="9.4", id="g"),
+      @SpecAssertion(section="9.4.1", id="a"),
+      @SpecAssertion(section="9.4.1", id="d"),
+      @SpecAssertion(section="9.4.1", id="e"),
+      @SpecAssertion(section="9.4.1", id="f"),
+      @SpecAssertion(section="9.4.1", id="g"),
+      @SpecAssertion(section="9.4.2", id="a"),
+      @SpecAssertion(section="9.4.2", id="d")
+   })
+   public void testNamespaceAggregation()
+   {
+      assert true;
+   }
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/AnotherTestInterceptorBindingType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/AnotherTestInterceptorBindingType.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/AnotherTestInterceptorBindingType.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes.foo;
+
+import javax.interceptor.InterceptorBindingType;
+
+ at InterceptorBindingType
+public @interface AnotherTestInterceptorBindingType
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestBindingType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestBindingType.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestBindingType.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes.foo;
+
+public @interface TestBindingType
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestDeploymentType.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestDeploymentType.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes.foo;
+
+import javax.inject.DeploymentType;
+
+ at DeploymentType
+public @interface TestDeploymentType
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestInterceptorBindingType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestInterceptorBindingType.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestInterceptorBindingType.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes.foo;
+
+public @interface TestInterceptorBindingType
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestNamed.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestNamed.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestNamed.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes.foo;
+
+import javax.annotation.Named;
+
+ at Named
+public @interface TestNamed
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestScopeType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestScopeType.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestScopeType.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes.foo;
+
+import javax.context.ScopeType;
+
+ at ScopeType
+public @interface TestScopeType
+{
+
+}

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestStereotype.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestStereotype.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/annotationtypes/foo/TestStereotype.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.xml.annotationtypes.foo;
+
+public @interface TestStereotype
+{
+
+}

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/metadata/XmlBasedMetadataTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/metadata/XmlBasedMetadataTest.java	2009-04-08 00:20:36 UTC (rev 2341)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/xml/metadata/XmlBasedMetadataTest.java	2009-04-08 08:55:15 UTC (rev 2342)
@@ -28,10 +28,7 @@
       @SpecAssertion(section="9", id="d"),
       @SpecAssertion(section="9.1", id="b"),
       @SpecAssertion(section="9.1", id="c"),
-      @SpecAssertion(section="9.1", id="d"),
-      @SpecAssertion(section="9.3", id="a"),
-      @SpecAssertion(section="9.3", id="b"),
-      @SpecAssertion(section="9.3", id="c")
+      @SpecAssertion(section="9.1", id="d")
    })
    public void testXmlBasedMetadata()
    {

Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml	                        (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/xml/annotationtypes/beans.xml	2009-04-08 08:55:15 UTC (rev 2342)
@@ -0,0 +1,17 @@
+<Beans xmlns="urn:java:ee"
+	xmlns:dd="urn:java:ee urn:java:org.jboss.jsr299.tck.tests.xml.annotationtypes.foo">
+	<dd:TestBindingType>
+		<BindingType />
+	</dd:TestBindingType>
+	<dd:TestInterceptorBindingType>
+		<InterceptorBindingType />
+		<dd:AnotherTestInterceptorBindingType />
+	</dd:TestInterceptorBindingType>
+	<dd:TestStereotype>
+		<Stereotype />
+		<dd:TestScopeType />
+		<dd:TestDeploymentType />
+		<dd:AnotherTestInterceptorBindingType />
+		<dd:TestNamed />
+	</dd:TestStereotype>
+</Beans>
\ No newline at end of file




More information about the weld-commits mailing list