[weld-commits] Weld SVN: r5262 - in cdi-tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator and 2 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Thu Dec 10 03:44:23 EST 2009


Author: jharting
Date: 2009-12-10 03:44:22 -0500 (Thu, 10 Dec 2009)
New Revision: 5262

Added:
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalDecorator.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Animal.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/AnimalDecorator.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotInjectedTest.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java
Removed:
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java
Modified:
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java
   cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java
   cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml
   cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml
Log:
CDITCK-83

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java	2009-12-10 02:25:51 UTC (rev 5261)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -2,5 +2,5 @@
 
 interface Animal
 {
-
+	String hello();
 }

Copied: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalDecorator.java (from rev 5251, cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java)
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalDecorator.java	                        (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalDecorator.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+ at Decorator
+class AnimalDecorator implements Animal {
+	
+	@Inject	@Delegate
+	private Animal bean;
+
+	public String hello() {
+		return bean.hello() + " world!";
+	}
+}

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java	2009-12-10 02:25:51 UTC (rev 5261)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -4,7 +4,7 @@
 import javax.enterprise.inject.spi.InjectionPoint;
 import javax.inject.Inject;
 
-class Cat
+class Cat implements Animal
 {
    @Inject private InjectionPoint injectionPoint;
    

Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java	2009-12-10 02:25:51 UTC (rev 5261)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -1,17 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
- at Decorator
-class CatDecorator extends Cat
-{
-   @Inject @Delegate Cat bean;
-
-   @Override
-   public String hello()
-   {
-      return bean.hello() + " world!";
-   }
-}

Added: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Animal.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Animal.java	                        (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Animal.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+interface Animal {
+	String hello();
+}

Copied: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/AnimalDecorator.java (from rev 5251, cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java)
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/AnimalDecorator.java	                        (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/AnimalDecorator.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -0,0 +1,16 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+ at Decorator
+class AnimalDecorator implements Animal
+{
+   @Inject @Delegate Animal bean;
+
+   public String hello()
+   {
+      return bean.hello() + " world!";
+   }
+}

Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java	2009-12-10 02:25:51 UTC (rev 5261)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/Cat.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -1,6 +1,6 @@
 package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
 
-class Cat
+class Cat implements Animal
 {
    public String hello() {
       return "hello";

Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java	2009-12-10 02:25:51 UTC (rev 5261)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/CatDecorator.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -1,17 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
-
-import javax.decorator.Decorator;
-import javax.decorator.Delegate;
-import javax.inject.Inject;
-
- at Decorator
-class CatDecorator extends Cat
-{
-   @Inject @Delegate Cat bean;
-
-   @Override
-   public String hello()
-   {
-      return bean.hello() + " world!";
-   }
-}

Copied: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotInjectedTest.java (from rev 5251, cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java)
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotInjectedTest.java	                        (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotInjectedTest.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentFailure;
+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.ExpectedDeploymentException;
+import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.testng.annotations.Test;
+
+ at Artifact
+ at BeansXml("beans.xml")
+ at SpecVersion(spec="cdi", version="20091101")
+ at ExpectedDeploymentException(DeploymentFailure.class)
+public class DecoratorNotInjectedTest extends AbstractJSR299Test
+{
+
+   @Test(groups = { "resolution" })
+   @SpecAssertion(section = "5.1.4", id = "a")
+   public void testDecoratorNotResolved() 
+   {
+	   assert false;
+   }
+}

Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java	2009-12-10 02:25:51 UTC (rev 5261)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/DecoratorNotResolvedTest.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,  
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
-
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-
-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.jsr299.BeansXml;
-import org.testng.annotations.Test;
-
- at Artifact
- at BeansXml("beans.xml")
- at SpecVersion(spec="cdi", version="20091101")
-public class DecoratorNotResolvedTest extends AbstractJSR299Test
-{
-
-   @Test(groups = { "resolution", "rewrite" })
-   @SpecAssertion(section = "5.1.4", id = "a")
-   // TODO PLM should check injection, not resolution
-   public void testDecoratorNotResolved() 
-   {
-      Set<Type> types = new HashSet<Type>();
-      for (Bean<Cat> bean : getBeans(Cat.class)) {
-         types.addAll(bean.getTypes());
-      }
-      assert !types.contains(CatDecorator.class);
-      assert getInstanceByType(Cat.class) != null;
-   }
-}

Added: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java	                        (rev 0)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/House.java	2009-12-10 08:44:22 UTC (rev 5262)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator;
+
+import javax.inject.Inject;
+
+class House {
+	@SuppressWarnings("unused")
+	@Inject
+	private AnimalDecorator decorator;
+}

Modified: cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml	2009-12-10 02:25:51 UTC (rev 5261)
+++ cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml	2009-12-10 08:44:22 UTC (rev 5262)
@@ -1,6 +1,6 @@
 <beans> 
    <decorators>
       <class>org.jboss.jsr299.tck.tests.lookup.injectionpoint.TimestampLogger</class>
-      <class>org.jboss.jsr299.tck.tests.lookup.injectionpoint.CatDecorator</class>
+      <class>org.jboss.jsr299.tck.tests.lookup.injectionpoint.AnimalDecorator</class>
    </decorators>
 </beans>

Modified: cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml
===================================================================
--- cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml	2009-12-10 02:25:51 UTC (rev 5261)
+++ cdi-tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/typesafe/resolution/decorator/beans.xml	2009-12-10 08:44:22 UTC (rev 5262)
@@ -1,5 +1,5 @@
 <beans> 
    <decorators>
-      <class>org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator.CatDecorator</class>
+      <class>org.jboss.jsr299.tck.tests.lookup.typesafe.resolution.decorator.AnimalDecorator</class>
    </decorators>
 </beans>



More information about the weld-commits mailing list