Author: shane.bryzak(a)jboss.com
Date: 2009-10-04 23:34:45 -0400 (Sun, 04 Oct 2009)
New Revision: 3843
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Animal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Barn.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/BorderCollie.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Cat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Chunky.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ChunkyQualifier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ClippedBorderCollie.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Cod.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DeadlyAnimal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DeadlySpider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DefangedTarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/EnglishBorderCollie.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Hairy.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/HairyQualifier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Horse.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/LongHairedDog.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/MiniatureShetlandPony.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Order.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/OrderProcessor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Produced.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/QualifierDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ScottishFish.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ShetlandPony.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Species.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Spider.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/SpiderProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Synchronous.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/SynchronousQualifier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tame.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/TameQualifier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tarantula.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tuna.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Whitefish.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/WhitefishQualifier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollie.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollieLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnglishBorderCollie.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnglishBorderCollieLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnterpriseQualifierDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/FamousCat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/FamousCatLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Hairless.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairlessCat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairlessQualifier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Hairy.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairyQualifier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/LongHairedDog.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Skinny.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCatLocal.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyQualifier.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCatLocal.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/OuterClass.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java
Log:
rename, minor
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Animal.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Animal.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Animal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Animal.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+interface Animal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Barn.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Barn.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Barn.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Barn.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.inject.Inject;
+
+
+class Barn
+{
+ @Inject @Tame
+ public Tarantula petSpider;
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/BorderCollie.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BorderCollie.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/BorderCollie.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/BorderCollie.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+class BorderCollie extends LongHairedDog
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Cat.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Cat.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Cat.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Cat.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+
+
+@Synchronous
+class Cat
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Chunky.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Chunky.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Chunky.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Chunky.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,24 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Chunky
+{
+
+ boolean realChunky();
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ChunkyQualifier.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/ChunkyBinding.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ChunkyQualifier.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ChunkyQualifier.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.enterprise.inject.AnnotationLiteral;
+
+class ChunkyQualifier extends AnnotationLiteral<Chunky> implements Chunky
+{
+ private boolean chunky;
+
+ public ChunkyQualifier(boolean chunky)
+ {
+ this.chunky = chunky;
+ }
+
+ public boolean realChunky()
+ {
+ return chunky;
+ }
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ClippedBorderCollie.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/ClippedBorderCollie.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ClippedBorderCollie.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ClippedBorderCollie.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+@Hairy(clipped=true)
+class ClippedBorderCollie extends BorderCollie
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Cod.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Cod.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Cod.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Cod.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.inject.Named;
+
+@Whitefish
+@Chunky(realChunky=true)
+@Named("whitefish")
+class Cod implements ScottishFish
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DeadlyAnimal.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/DeadlyAnimal.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DeadlyAnimal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DeadlyAnimal.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+interface DeadlyAnimal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DeadlySpider.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/DeadlySpider.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DeadlySpider.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DeadlySpider.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+interface DeadlySpider extends DeadlyAnimal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DefangedTarantula.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/DefangedTarantula.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DefangedTarantula.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/DefangedTarantula.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,11 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+class DefangedTarantula extends Tarantula
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4125502808853107948L;
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/EnglishBorderCollie.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/EnglishBorderCollie.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/EnglishBorderCollie.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/EnglishBorderCollie.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+class EnglishBorderCollie extends BorderCollie
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Hairy.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Hairy.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Hairy.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Hairy.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,26 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@Inherited
+@interface Hairy
+{
+
+ public boolean clipped();
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/HairyQualifier.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/HairyBinding.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/HairyQualifier.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/HairyQualifier.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.enterprise.inject.AnnotationLiteral;
+
+public class HairyQualifier extends AnnotationLiteral<Hairy> implements Hairy
+{
+ private boolean clipped;
+
+ public HairyQualifier(boolean clipped)
+ {
+ this.clipped = clipped;
+ }
+
+ public boolean clipped()
+ {
+ return clipped;
+ }
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Horse.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Horse.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Horse.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Horse.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+@Species
+class Horse
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/LongHairedDog.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/LongHairedDog.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/LongHairedDog.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/LongHairedDog.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+@Hairy(clipped=false)
+class LongHairedDog
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/MiniatureShetlandPony.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/MiniatureShetlandPony.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/MiniatureShetlandPony.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/MiniatureShetlandPony.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+class MiniatureShetlandPony extends ShetlandPony
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Order.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Order.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Order.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Order.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.inject.Inject;
+
+class Order
+{
+ @Inject
+ public Order(OrderProcessor processor) {}
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/OrderProcessor.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/OrderProcessor.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/OrderProcessor.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/OrderProcessor.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+
+public class OrderProcessor
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Produced.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Produced.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Produced.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Produced.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Produced
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/QualifierDefinitionTest.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/QualifierDefinitionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/QualifierDefinitionTest.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,157 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import javax.enterprise.inject.New;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.literals.AnyLiteral;
+import org.jboss.jsr299.tck.literals.DefaultLiteral;
+import org.jboss.jsr299.tck.literals.NewLiteral;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecAssertions;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.testng.annotations.Test;
+
+@Artifact
+@SpecVersion(spec="cdi", version="PFD2")
+public class QualifierDefinitionTest extends AbstractJSR299Test
+{
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "2.3.1", id = "a0"),
+ @SpecAssertion(section = "2.3.1", id = "aa")
+ })
+ public void testDefaultQualifierDeclaredInJava()
+ {
+ Bean<Order> order = getBeans(Order.class).iterator().next();
+ assert order.getQualifiers().size() == 2;
+ assert order.getQualifiers().contains(new DefaultLiteral());
+ assert order.getQualifiers().contains(new AnyLiteral());
+ }
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "2.3.1", id = "b"),
+ @SpecAssertion(section = "11.1", id = "c")
+ })
+ public void testDefaultQualifierForInjectionPoint()
+ {
+ Bean<Order> order = getBeans(Order.class).iterator().next();
+ InjectionPoint injectionPoint = order.getInjectionPoints().iterator().next();
+ assert injectionPoint.getBean().getQualifiers().contains(new DefaultLiteral());
+ }
+
+ @Test
+ @SpecAssertion(section = "2.3.1", id = "a0")
+ public void testNewQualifierAndAnyBindingMutualExclusive()
+ {
+ New newOrderProcessor = new NewLiteral()
+ {
+
+ public Class<?> value()
+ {
+ return OrderProcessor.class;
+ }
+ };
+ assert getBeans(OrderProcessor.class, newOrderProcessor).size() == 1;
+ Bean<OrderProcessor> order = getBeans(OrderProcessor.class,
newOrderProcessor).iterator().next();
+ assert order.getQualifiers().size() == 1;
+ assert order.getQualifiers().iterator().next().equals(newOrderProcessor);
+ }
+
+ @Test(groups = { "annotationDefinition", "rewrite" })
+ @SpecAssertion(section = "2.3.2", id = "ba")
+ public void testQualifierDeclaresBindingAnnotation()
+ {
+ // Probably can use new SPI for this...
+ assert !getBeans(Tarantula.class, new TameQualifier()).isEmpty();
+ }
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "2.3.3", id = "a"),
+ @SpecAssertion(section="3.1.3", id="be")
+ })
+ public void testQualifiersDeclaredInJava()
+ {
+ Bean<Cat> cat = getBeans(Cat.class, new
SynchronousQualifier()).iterator().next();
+ assert cat.getQualifiers().size() == 2;
+ assert cat.getQualifiers().contains(new SynchronousQualifier());
+ }
+
+ @Test
+ @SpecAssertions({
+ @SpecAssertion(section = "2.3.3", id = "d")
+ })
+ public void testMultipleQualifiers()
+ {
+ Bean<?> model = getBeans(Cod.class, new ChunkyQualifier(true), new
WhitefishQualifier()).iterator().next();
+ assert model.getQualifiers().size() == 4;
+ }
+
+ @Test(groups = { "injection", "producerMethod" })
+ @SpecAssertion(section = "2.3.5", id = "a")
+ public void testFieldInjectedFromProducerMethod() throws Exception
+ {
+ Bean<Barn> barnBean = getBeans(Barn.class).iterator().next();
+ Barn barn =
barnBean.create(getCurrentManager().createCreationalContext(barnBean));
+ assert barn.petSpider != null;
+ assert barn.petSpider instanceof DefangedTarantula;
+ }
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "aa")
+ public void testQualifierDeclaredInheritedIsInherited() throws Exception
+ {
+ Set<? extends Annotation> bindings = getBeans(BorderCollie.class, new
HairyQualifier(false)).iterator().next().getQualifiers();
+ assert bindings.size() == 2;
+ assert bindings.contains(new HairyQualifier(false));
+ assert bindings.contains(new AnyLiteral());
+ }
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "aaa")
+ public void testQualifierNotDeclaredInheritedIsNotInherited()
+ {
+ Set<? extends Annotation> bindings =
getBeans(ShetlandPony.class).iterator().next().getQualifiers();
+ assert bindings.size() == 2;
+ assert bindings.contains(new DefaultLiteral());
+ assert bindings.contains(new AnyLiteral());
+ }
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "aa")
+ public void testQualifierDeclaredInheritedIsBlockedByIntermediateClass()
+ {
+ Set<? extends Annotation> bindings = getBeans(ClippedBorderCollie.class, new
HairyQualifier(true)).iterator().next().getQualifiers();
+ assert bindings.size() == 2;
+ Annotation hairyLiteral = new HairyQualifier(true);
+ assert bindings.contains(hairyLiteral);
+ assert bindings.contains(new AnyLiteral());
+ }
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "ag")
+ public void testQualifierDeclaredInheritedIsIndirectlyInherited()
+ {
+ Set<? extends Annotation> bindings = getBeans(EnglishBorderCollie.class, new
HairyQualifier(false)).iterator().next().getQualifiers();
+ assert bindings.size() == 2;
+ assert bindings.contains(new HairyQualifier(false));
+ }
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "aga")
+ public void testQualifierNotDeclaredInheritedIsNotIndirectlyInherited()
+ {
+ Set<? extends Annotation> bindings =
getBeans(MiniatureShetlandPony.class).iterator().next().getQualifiers();
+ assert bindings.size() == 2;
+ assert bindings.contains(new DefaultLiteral());
+ assert bindings.contains(new AnyLiteral());
+ }
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ScottishFish.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/ScottishFish.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ScottishFish.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ScottishFish.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+
+interface ScottishFish extends Animal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ShetlandPony.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/ShetlandPony.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ShetlandPony.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/ShetlandPony.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+class ShetlandPony extends Horse
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Species.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Species.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Species.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Species.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Species
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Spider.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Spider.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Spider.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Spider.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,12 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+
+class Spider implements Animal
+{
+
+ public final void layEggs()
+ {
+
+ }
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/SpiderProducer.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/SpiderProducer.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/SpiderProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/SpiderProducer.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,18 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.enterprise.inject.Produces;
+
+class SpiderProducer
+{
+
+ @Produces @Tame public Tarantula produceTameTarantula()
+ {
+ return new DefangedTarantula();
+ }
+
+ @Produces @Produced public Spider produceSpiderFromInjection(@Tame Tarantula
tarantula)
+ {
+ return tarantula;
+ }
+
+}
\ No newline at end of file
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Synchronous.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Synchronous.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Synchronous.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Synchronous.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { FIELD, PARAMETER, METHOD, TYPE })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Synchronous
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/SynchronousQualifier.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/SynchronousBinding.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/SynchronousQualifier.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/SynchronousQualifier.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.enterprise.inject.AnnotationLiteral;
+
+class SynchronousQualifier extends AnnotationLiteral<Synchronous> implements
Synchronous
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tame.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Tame.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tame.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tame.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Tame
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/TameQualifier.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/TameBinding.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/TameQualifier.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/TameQualifier.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.enterprise.inject.AnnotationLiteral;
+
+class TameQualifier extends AnnotationLiteral<Tame> implements Tame
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tarantula.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Tarantula.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tarantula.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tarantula.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,13 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import java.io.Serializable;
+
+class Tarantula extends Spider implements DeadlySpider, Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tuna.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Tuna.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tuna.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Tuna.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,14 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+class Tuna
+{
+
+ public String getName()
+ {
+ return "Ophir";
+ }
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Whitefish.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/Whitefish.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Whitefish.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/Whitefish.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Whitefish
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/WhitefishQualifier.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/WhitefishBinding.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/WhitefishQualifier.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/WhitefishQualifier.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier;
+
+import javax.enterprise.inject.AnnotationLiteral;
+
+class WhitefishQualifier extends AnnotationLiteral<Whitefish> implements Whitefish
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollie.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/BorderCollie.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollie.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollie.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Stateless;
+
+@Stateless
+public class BorderCollie extends LongHairedDog implements BorderCollieLocal
+{
+
+}
\ No newline at end of file
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollieLocal.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/BorderCollieLocal.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollieLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/BorderCollieLocal.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface BorderCollieLocal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnglishBorderCollie.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/EnglishBorderCollie.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnglishBorderCollie.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnglishBorderCollie.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Stateless;
+
+@Stateless
+class EnglishBorderCollie extends BorderCollie implements EnglishBorderCollieLocal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnglishBorderCollieLocal.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/EnglishBorderCollieLocal.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnglishBorderCollieLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnglishBorderCollieLocal.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface EnglishBorderCollieLocal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnterpriseQualifierDefinitionTest.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/EnterpriseBindingDefinitionTest.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnterpriseQualifierDefinitionTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/EnterpriseQualifierDefinitionTest.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,61 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+/**
+ * TODO This test specifically tests session beans even though the assertions are true
+ * for all managed beans. So likely there should be a parallel set of tests for session
+ * and other managed beans.
+ *
+ */
+@Artifact
+@IntegrationTest
+(a)Packaging(PackagingType.EAR)
+@SpecVersion(spec="cdi", version="PFD2")
+public class EnterpriseQualifierDefinitionTest extends AbstractJSR299Test
+{
+ @SuppressWarnings("unchecked")
+ @Test
+ @SpecAssertion(section = "4.1", id = "al")
+ public void testQualifierDeclaredInheritedIsInherited() throws Exception
+ {
+ Set<? extends Annotation> qualifiers = getBeans(BorderCollieLocal.class, new
HairyQualifier(false)).iterator().next().getQualifiers();
+ assert annotationSetMatches(qualifiers, Any.class, Hairy.class);
+ }
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "ala")
+ public void testQualifierNotDeclaredInheritedIsNotInherited() throws Exception
+ {
+ assert getBeans(TameSkinnyHairlessCatLocal.class, new SkinnyQualifier()).size() ==
0;
+ }
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "ap")
+ public void testQualifierDeclaredInheritedIsIndirectlyInherited()
+ {
+ Set<? extends Annotation> qualifiers =
getBeans(EnglishBorderCollieLocal.class, new
HairyQualifier(false)).iterator().next().getQualifiers();
+ assert annotationSetMatches(qualifiers, Any.class, Hairy.class);
+ }
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "apa")
+ public void testQualifierNotDeclaredInheritedIsNotIndirectlyInherited()
+ {
+ Set<Bean<FamousCatLocal>> beans = getBeans(FamousCatLocal.class, new
SkinnyQualifier());
+ assert beans.size() == 0;
+ }
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/FamousCat.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/FamousCat.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/FamousCat.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/FamousCat.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Stateless;
+
+@Stateless
+class FamousCat extends TameSkinnyHairlessCat implements FamousCatLocal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/FamousCatLocal.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/FamousCatLocal.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/FamousCatLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/FamousCatLocal.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface FamousCatLocal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Hairless.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/Hairless.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Hairless.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Hairless.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,24 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@Inherited
+@interface Hairless
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairlessCat.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/HairlessCat.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairlessCat.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairlessCat.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+@Hairless
+class HairlessCat
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairlessQualifier.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/HairlessBinding.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairlessQualifier.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairlessQualifier.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.enterprise.inject.AnnotationLiteral;
+
+public class HairlessQualifier extends AnnotationLiteral<Hairless> implements
Hairless
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Hairy.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/Hairy.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Hairy.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Hairy.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,25 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@Inherited
+@interface Hairy
+{
+ public boolean clipped();
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairyQualifier.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/HairyBinding.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairyQualifier.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/HairyQualifier.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.enterprise.inject.AnnotationLiteral;
+
+public class HairyQualifier extends AnnotationLiteral<Hairy> implements Hairy
+{
+ private boolean clipped;
+
+ public HairyQualifier(boolean clipped)
+ {
+ this.clipped = clipped;
+ }
+
+ public boolean clipped()
+ {
+ return clipped;
+ }
+
+}
\ No newline at end of file
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/LongHairedDog.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/LongHairedDog.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/LongHairedDog.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/LongHairedDog.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+@Hairy(clipped=false)
+class LongHairedDog
+{
+
+}
\ No newline at end of file
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Skinny.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/Skinny.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Skinny.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/Skinny.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+@interface Skinny
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCat.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/SkinnyHairlessCat.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCat.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCat.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,10 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Stateless;
+
+@Stateless
+@Skinny
+class SkinnyHairlessCat extends HairlessCat implements SkinnyHairlessCatLocal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCatLocal.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/SkinnyHairlessCatLocal.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCatLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCatLocal.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface SkinnyHairlessCatLocal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyQualifier.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/SkinnyBinding.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyQualifier.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/SkinnyQualifier.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.enterprise.inject.AnnotationLiteral;
+
+public class SkinnyQualifier extends AnnotationLiteral<Skinny> implements Skinny
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCat.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCat.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCat.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCat.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Stateless;
+
+@Stateless
+class TameSkinnyHairlessCat extends SkinnyHairlessCat implements
TameSkinnyHairlessCatLocal
+{
+
+}
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCatLocal.java
(from rev 3830,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/enterprise/TameSkinnyHairlessCatLocal.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCatLocal.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCatLocal.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.definition.qualifier.enterprise;
+
+import javax.ejb.Local;
+
+@Local
+public interface TameSkinnyHairlessCatLocal
+{
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-10-05
02:53:26 UTC (rev 3842)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -51,7 +51,6 @@
@Test(groups = { "enterpriseBeans" })
@SpecAssertions( {
- @SpecAssertion(section = "3.1.1", id = "f"),
@SpecAssertion(section = "3.2.2", id = "aa"),
@SpecAssertion(section = "3.2.3", id = "c") } )
public void
testBeanTypesAreLocalInterfacesWithoutWildcardTypesOrTypeVariablesWithSuperInterfaces()
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/OuterClass.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/OuterClass.java 2009-10-05
02:53:26 UTC (rev 3842)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/OuterClass.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -4,10 +4,10 @@
class OuterClass
{
- class InnerClass_NotBeean
+ class InnerClass_NotBean
{
- public InnerClass_NotBeean()
+ public InnerClass_NotBean()
{
}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java 2009-10-05
02:53:26 UTC (rev 3842)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/definition/SimpleBeanDefinitionTest.java 2009-10-05
03:34:45 UTC (rev 3843)
@@ -1,7 +1,7 @@
package org.jboss.jsr299.tck.tests.implementation.simple.definition;
import org.jboss.jsr299.tck.AbstractJSR299Test;
-import
org.jboss.jsr299.tck.tests.implementation.simple.definition.OuterClass.InnerClass_NotBeean;
+import
org.jboss.jsr299.tck.tests.implementation.simple.definition.OuterClass.InnerClass_NotBean;
import
org.jboss.jsr299.tck.tests.implementation.simple.definition.OuterClass.StaticInnerClass;
import org.jboss.test.audit.annotations.SpecAssertion;
import org.jboss.test.audit.annotations.SpecAssertions;
@@ -36,7 +36,7 @@
})
public void testNonStaticInnerClassDeclaredInJavaNotDiscovered()
{
- assert getBeans(InnerClass_NotBeean.class).size() == 0;
+ assert getBeans(InnerClass_NotBean.class).size() == 0;
}
@Test
@@ -46,17 +46,6 @@
assert getBeans(Car.class).size() == 0;
}
- //Not sure yet whether this is needed
-// @Test
-// public void testClassesImplementingServletInterfacesNotDiscoveredAsSimpleBeans()
-// {
-// assert getBeans(MockFilter.class).size() == 0;
-// assert getBeans(MockHttpSessionListener.class).size() == 0;
-// assert getBeans(MockServlet.class).size() == 0;
-// assert getBeans(MockServletContextListener.class).size() == 0;
-// assert getBeans(MockServletRequestListener.class).size() == 0;
-// }
-
@Test
@SpecAssertion(section="3.1.1", id="f")
public void testClassesImplementingEnterpriseBeanInterfaceNotDiscoveredAsSimpleBean()