Author: jharting
Date: 2009-07-30 04:57:27 -0400 (Thu, 30 Jul 2009)
New Revision: 3362
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/BrokenInjectedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/DependencyResolutionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/InjectedBean.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/IntegerProducer.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Mustard.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Other.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/OtherLiteral.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Small.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Vanilla.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/injection/session/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/beans.xml
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/
Log:
Cleanup
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/BrokenInjectedBean.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/BrokenInjectedBean.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/BrokenInjectedBean.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.dependency.resolution;
-
-import javax.enterprise.inject.Current;
-
-
-class BrokenInjectedBean
-{
- public @Current Mustard mustard;
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/DependencyResolutionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/DependencyResolutionTest.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/DependencyResolutionTest.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,179 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.dependency.resolution;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.inject.AnnotationLiteral;
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.ForwardingBean;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.testng.annotations.Test;
-
-/**
- * Tests for dependency resolution problem detection
- */
-@Artifact
-@SpecVersion("20090625")
-public class DependencyResolutionTest extends AbstractJSR299Test
-{
- class MockInjectionPoint implements InjectionPoint
- {
- private Bean<?> beanWithManager;
- private Type type;
- private Member member;
- private Set<Annotation> bindings;
-
- public MockInjectionPoint(Bean<?> bean, Type type, Member member,
- Set<Annotation> bindings)
- {
- this.beanWithManager = bean;
- this.type = type;
- this.member = member;
- this.bindings = bindings;
- }
-
- public Bean<?> getBean()
- {
- return beanWithManager;
- }
-
- public Set<Annotation> getBindings()
- {
- return bindings;
- }
-
- public Member getMember()
- {
- return member;
- }
-
- public Type getType()
- {
- return type;
- }
-
- public Annotated getAnnotated()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean isDelegate()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean isTransient()
- {
- // TODO Auto-generated method stub
- return false;
- }
- }
-
- @Test(groups = "rewrite")
- @SpecAssertion(section = "5.3.1", id = "aa")
- public void testUnsatisfiedDependencyDetected() throws Exception
- {
- Bean<Vanilla> vanillaBean = getBeans(Vanilla.class).iterator().next();
-
- Field injectedField = InjectedBean.class.getField("vanilla");
- Set<Annotation> bindings = new HashSet<Annotation>();
- bindings.add(new OtherLiteral());
- MockInjectionPoint injectionPoint = new MockInjectionPoint(vanillaBean,
Vanilla.class, injectedField, bindings);
-
- assert getCurrentManager().getInjectableReference(injectionPoint, null) instanceof
Vanilla;
- }
-
- @Test(groups = "rewrite")
- @SpecAssertion(section = "5.3.1", id = "aa")
- public void testAmbiguousDependencyDetected() throws Exception
- {
- Bean<Vanilla> vanillaBean = getBeans(Vanilla.class).iterator().next();
-
- Field injectedField = InjectedBean.class.getField("vanilla");
- Set<Annotation> bindings = new HashSet<Annotation>();
- bindings.add(new OtherLiteral());
- MockInjectionPoint injectionPoint = new MockInjectionPoint(vanillaBean,
Vanilla.class, injectedField, bindings);
- getCurrentManager().getInjectableReference(injectionPoint, null);
- }
-
- @Test(groups = "rewrite")
- @SpecAssertion(section = "5.5.1", id = "aa")
- public void testUnproxyableDependencyDetected() throws Exception
- {
- final Bean<Mustard> bean = getBeans(Mustard.class).iterator().next();
- final Set<Annotation> bindings = new HashSet<Annotation>();
- bindings.add(new OtherLiteral());
-
- Bean<Mustard> wrappedBean = new ForwardingBean<Mustard>()
- {
-
- @Override
- protected Bean<Mustard> delegate()
- {
- return bean;
- }
-
- @Override
- public Class<? extends Annotation> getScopeType()
- {
- return RequestScoped.class;
- }
-
- @Override
- public Set<Annotation> getBindings()
- {
- return bindings;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- return this == obj;
- }
-
- public Class<?> getBeanClass()
- {
- return Mustard.class;
- }
-
- public boolean isPolicy()
- {
- return false;
- }
-
- public Set<Class<? extends Annotation>> getStereotypes()
- {
- return Collections.emptySet();
- }
-
- };
-
- getCurrentManager().addBean(wrappedBean);
-
- Field injectedField = BrokenInjectedBean.class.getField("mustard");
- MockInjectionPoint injectionPoint = new MockInjectionPoint(bean, Mustard.class,
injectedField, bindings);
- getCurrentManager().getInjectableReference(injectionPoint, null);
- }
-
- @Test
- @SpecAssertion(section="5.3.4", id="aa")
- public void testTypeBoxing()
- {
- assert getInstanceByType(Integer.class, new AnnotationLiteral<Small>()
{}).equals(IntegerProducer.VALUE);
- }
-
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/InjectedBean.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/InjectedBean.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/InjectedBean.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,8 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.dependency.resolution;
-
-import javax.enterprise.inject.Current;
-
-class InjectedBean
-{
- @Current public Vanilla vanilla;
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/IntegerProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/IntegerProducer.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/IntegerProducer.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,36 +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.dependency.resolution;
-
-import javax.enterprise.inject.Produces;
-
-/**
- * @author pmuir
- *
- */
-public class IntegerProducer
-{
-
- public static final int VALUE = 5;
-
- @Produces @Small
- public int produce()
- {
- return VALUE;
- }
-
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Mustard.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Mustard.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Mustard.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,12 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.dependency.resolution;
-
-
-public class Mustard
-{
-
- private Mustard()
- {
- // TODO Auto-generated constructor stub
- }
-
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Other.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Other.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Other.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,22 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.dependency.resolution;
-
-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.enterprise.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-public @interface Other
-{
-
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/OtherLiteral.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/OtherLiteral.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/OtherLiteral.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,8 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.dependency.resolution;
-
-import javax.enterprise.inject.AnnotationLiteral;
-
-class OtherLiteral extends AnnotationLiteral<Other> implements Other
-{
-
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Small.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Small.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Small.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,22 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.dependency.resolution;
-
-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.enterprise.inject.BindingType;
-
-@Target( { TYPE, METHOD, PARAMETER, FIELD })
-@Retention(RUNTIME)
-@Documented
-@BindingType
-@interface Small
-{
-
-}
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Vanilla.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Vanilla.java 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/dependency/resolution/Vanilla.java 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,7 +0,0 @@
-package org.jboss.jsr299.tck.tests.lookup.dependency.resolution;
-
-
-class Vanilla
-{
-
-}
Deleted:
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/beans.xml
===================================================================
---
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/beans.xml 2009-07-30
08:35:45 UTC (rev 3361)
+++
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/beans.xml 2009-07-30
08:57:27 UTC (rev 3362)
@@ -1,3 +0,0 @@
-<beans>
-
-</beans>