[webbeans-commits] Webbeans SVN: r996 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition: scope and 1 other directory.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Thu Jan 15 15:29:44 EST 2009
Author: pete.muir at jboss.org
Date: 2009-01-15 15:29:44 -0500 (Thu, 15 Jan 2009)
New Revision: 996
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/AnotherScope.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/BorderCollie.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Dog.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/GoldenRetriever.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Retriever.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTypeTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ScopeTypeTest.java
Log:
Scope type inheritence tests
Copied: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTest.java (from rev 993, tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTypeTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTest.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -0,0 +1,198 @@
+package org.jboss.webbeans.tck.tests.definition.binding;
+
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Set;
+
+import javax.webbeans.Current;
+import javax.webbeans.Production;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.impl.literals.CurrentBinding;
+import org.jboss.webbeans.tck.impl.util.Reflections;
+import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.testng.annotations.Test;
+
+ at SpecVersion("20081206")
+public class BindingTest extends AbstractTest
+{
+
+ @Override
+ protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
+ {
+ List<Class<? extends Annotation>> deploymentTypes = super.getEnabledDeploymentTypes();
+ deploymentTypes.add(AnotherDeploymentType.class);
+ return deploymentTypes;
+ }
+
+ @Test @SpecAssertion(section={"2.3.3", "2.3.1"})
+ public void testDefaultBindingDeclaredInJava()
+ {
+ Bean<Order> order = getSimpleBean(Order.class);
+ assert order.getBindings().size() == 1;
+ order.getBindings().iterator().next().annotationType().equals(Production.class);
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.3.2")
+ public void testBindingHasCorrectTarget()
+ {
+ assert false;
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.3.2")
+ public void testBindingHasCorrectRetention()
+ {
+ assert false;
+ }
+
+ @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.3.2")
+ public void testBindingDeclaresBindingAnnotation()
+ {
+ assert false;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test @SpecAssertion(section="2.3.3")
+ public void testBindingsDeclaredInJava()
+ {
+ Bean<Cat> cat = getSimpleBean(Cat.class);
+ assert cat.getBindings().size() == 1;
+ assert Reflections.annotationSetMatches(cat.getBindings(), Synchronous.class);
+ }
+
+ @Test @SpecAssertion(section="2.3.3")
+ public void testMultipleBindings()
+ {
+ Bean<?> model = getSimpleBean(Cod.class);
+ assert model.getBindings().size() == 2;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.3.4")
+ public void testBindingsDeclaredInXml()
+ {
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
+ //AnnotatedClass annotatedItem = new SimpleAnnotatedClass(Antelope.class, annotations);
+
+ //SimpleBean<Antelope> antelope = createSimpleBean(Antelope.class, annotatedItem, manager);
+ // assert Reflections.annotationSetMatches(antelope.getBindingTypes(), Asynchronous.class);
+ assert false;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.3.4")
+ public void testXmlBindingOverridesAndIgnoresJava()
+ {
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
+ //AnnotatedClass<Cat> annotatedItem = new SimpleAnnotatedClass<Cat>(Cat.class, annotations);
+
+ //SimpleBean<Cat> cat = createSimpleBean(Cat.class, annotatedItem, manager);
+ //assert cat.getBindingTypes().size() == 1;
+ //assert cat.getBindingTypes().contains(new AnnotationLiteral<Asynchronous>() {});
+ assert false;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.3.4")
+ public void testNoBindingsDeclaredInXml()
+ {
+ //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
+ //AnnotatedClass<Cat> annotatedItem = new SimpleAnnotatedClass<Cat>(Cat.class, annotations);
+
+ //SimpleBean<Cat> cat = createSimpleBean(Cat.class, annotatedItem, manager);
+ //assert cat.getBindingTypes().size() == 1;
+ //assert cat.getBindingTypes().contains(new AnnotationLiteral<Synchronous>() {});
+ assert false;
+ }
+
+ @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section={"2.3.4", "2.3.1"})
+ public void testDefaultBindingDeclaredInXml()
+ {
+ Bean<?> model = getSimpleBean(Tuna.class);
+ assert model.getBindings().size() == 1;
+ assert model.getBindings().contains(new CurrentBinding());
+ assert false;
+ }
+
+ @Test(groups={"injection", "producerMethod"}) @SpecAssertion(section="2.3.5")
+ public void testFieldInjectedFromProducerMethod() throws Exception
+ {
+ Bean<SpiderProducer> spiderProducer = getSimpleBean(SpiderProducer.class);
+ manager.addBean(spiderProducer);
+ Method method = SpiderProducer.class.getMethod("produceTameTarantula");
+ manager.addBean(getProducerMethodBean(method, spiderProducer));
+ Barn barn = getSimpleBean(Barn.class).create();
+ assert barn.petSpider != null;
+ assert barn.petSpider instanceof DefangedTarantula;
+ }
+
+ @Test(groups={"stub", "injection", "webbeansxml"}) @SpecAssertion(section="2.3.5")
+ public void testFieldWithBindingInXml()
+ {
+ assert false;
+ }
+
+ @Test(groups={"stub", "injection", "webbeansxml"}) @SpecAssertion(section="2.3.5")
+ public void testFieldWithBindingInXmlIgnoresAnnotations()
+ {
+ assert false;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test(groups={"injection", "producerMethod"})
+ public void testMethodWithBindingAnnotationsOnParametersAreInjected() throws Exception
+ {
+ Bean<SpiderProducer> spiderProducer = getSimpleBean(SpiderProducer.class);
+ manager.addBean(spiderProducer);
+ Method method = SpiderProducer.class.getMethod("produceTameTarantula");
+ manager.addBean(getProducerMethodBean(method, spiderProducer));
+ method = SpiderProducer.class.getMethod("produceSpiderFromInjection", Tarantula.class);
+ Bean<Spider> spiderBean = (Bean<Spider>) getProducerMethodBean(method, spiderProducer);
+ Spider spider = spiderBean.create();
+ assert spider != null;
+ assert spider instanceof DefangedTarantula;
+ }
+
+ @Test(groups={"stub", "injection", "webbeansxml"}) @SpecAssertion(section="2.3.6")
+ public void testMethodWithBindingAnnotationsOnParametersDeclaredInXml()
+ {
+ assert false;
+ }
+
+ @Test(groups={"stub", "injection", "webbeansxml"}) @SpecAssertion(section="2.3.6")
+ public void testMethodWithBindingAnnotationsOnParametersDeclaredInXmlIgnoresAnnotations()
+ {
+ assert false;
+ }
+
+ @Test @SpecAssertion(section="4.1")
+ public void testBindingDeclaredInheritedIsInherited() throws Exception
+ {
+ Set<? extends Annotation> bindings = getSimpleBean(BorderCollie.class).getBindings();
+ assert bindings.size() == 1;
+ assert bindings.iterator().next().annotationType().equals(Hairy.class);
+ }
+
+ @Test @SpecAssertion(section="4.1")
+ public void testBindingNotDeclaredInheritedIsNotInherited()
+ {
+ Set<? extends Annotation> bindings = getSimpleBean(ShetlandPony.class).getBindings();
+ assert bindings.size() == 1;
+ assert bindings.iterator().next().annotationType().equals(Current.class);
+ }
+
+ @Test @SpecAssertion(section="4.1")
+ public void testBindingDeclaredInheritedIsBlockedByIntermediateClass()
+ {
+ Set<? extends Annotation> bindings = getSimpleBean(ClippedBorderCollie.class).getBindings();
+ assert bindings.size() == 1;
+ Annotation binding = bindings.iterator().next();
+ assert binding.annotationType().equals(Hairy.class);
+ Hairy hairy = (Hairy) binding;
+ assert hairy.clipped();
+ }
+
+}
\ No newline at end of file
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTypeTest.java 2009-01-15 19:57:27 UTC (rev 995)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/binding/BindingTypeTest.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -1,198 +0,0 @@
-package org.jboss.webbeans.tck.tests.definition.binding;
-
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Set;
-
-import javax.webbeans.Current;
-import javax.webbeans.Production;
-import javax.webbeans.manager.Bean;
-
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.jboss.webbeans.tck.impl.literals.CurrentBinding;
-import org.jboss.webbeans.tck.impl.util.Reflections;
-import org.jboss.webbeans.tck.tests.AbstractTest;
-import org.testng.annotations.Test;
-
- at SpecVersion("20081206")
-public class BindingTypeTest extends AbstractTest
-{
-
- @Override
- protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
- {
- List<Class<? extends Annotation>> deploymentTypes = super.getEnabledDeploymentTypes();
- deploymentTypes.add(AnotherDeploymentType.class);
- return deploymentTypes;
- }
-
- @Test @SpecAssertion(section={"2.3.3", "2.3.1"})
- public void testDefaultBindingDeclaredInJava()
- {
- Bean<Order> order = getSimpleBean(Order.class);
- assert order.getBindings().size() == 1;
- order.getBindings().iterator().next().annotationType().equals(Production.class);
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.3.2")
- public void testBindingHasCorrectTarget()
- {
- assert false;
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.3.2")
- public void testBindingHasCorrectRetention()
- {
- assert false;
- }
-
- @Test(groups={"stub", "annotationDefinition"}) @SpecAssertion(section="2.3.2")
- public void testBindingDeclaresBindingAnnotation()
- {
- assert false;
- }
-
- @SuppressWarnings("unchecked")
- @Test @SpecAssertion(section="2.3.3")
- public void testBindingsDeclaredInJava()
- {
- Bean<Cat> cat = getSimpleBean(Cat.class);
- assert cat.getBindings().size() == 1;
- assert Reflections.annotationSetMatches(cat.getBindings(), Synchronous.class);
- }
-
- @Test @SpecAssertion(section="2.3.3")
- public void testMultipleBindings()
- {
- Bean<?> model = getSimpleBean(Cod.class);
- assert model.getBindings().size() == 2;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.3.4")
- public void testBindingsDeclaredInXml()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
- //AnnotatedClass annotatedItem = new SimpleAnnotatedClass(Antelope.class, annotations);
-
- //SimpleBean<Antelope> antelope = createSimpleBean(Antelope.class, annotatedItem, manager);
- // assert Reflections.annotationSetMatches(antelope.getBindingTypes(), Asynchronous.class);
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.3.4")
- public void testXmlBindingOverridesAndIgnoresJava()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //annotations.put(Asynchronous.class, new AsynchronousAnnotationLiteral());
- //AnnotatedClass<Cat> annotatedItem = new SimpleAnnotatedClass<Cat>(Cat.class, annotations);
-
- //SimpleBean<Cat> cat = createSimpleBean(Cat.class, annotatedItem, manager);
- //assert cat.getBindingTypes().size() == 1;
- //assert cat.getBindingTypes().contains(new AnnotationLiteral<Asynchronous>() {});
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section="2.3.4")
- public void testNoBindingsDeclaredInXml()
- {
- //Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
- //AnnotatedClass<Cat> annotatedItem = new SimpleAnnotatedClass<Cat>(Cat.class, annotations);
-
- //SimpleBean<Cat> cat = createSimpleBean(Cat.class, annotatedItem, manager);
- //assert cat.getBindingTypes().size() == 1;
- //assert cat.getBindingTypes().contains(new AnnotationLiteral<Synchronous>() {});
- assert false;
- }
-
- @Test(groups={"stub", "webbeansxml"}) @SpecAssertion(section={"2.3.4", "2.3.1"})
- public void testDefaultBindingDeclaredInXml()
- {
- Bean<?> model = getSimpleBean(Tuna.class);
- assert model.getBindings().size() == 1;
- assert model.getBindings().contains(new CurrentBinding());
- assert false;
- }
-
- @Test(groups={"injection", "producerMethod"}) @SpecAssertion(section="2.3.5")
- public void testFieldInjectedFromProducerMethod() throws Exception
- {
- Bean<SpiderProducer> spiderProducer = getSimpleBean(SpiderProducer.class);
- manager.addBean(spiderProducer);
- Method method = SpiderProducer.class.getMethod("produceTameTarantula");
- manager.addBean(getProducerMethodBean(method, spiderProducer));
- Barn barn = getSimpleBean(Barn.class).create();
- assert barn.petSpider != null;
- assert barn.petSpider instanceof DefangedTarantula;
- }
-
- @Test(groups={"stub", "injection", "webbeansxml"}) @SpecAssertion(section="2.3.5")
- public void testFieldWithBindingInXml()
- {
- assert false;
- }
-
- @Test(groups={"stub", "injection", "webbeansxml"}) @SpecAssertion(section="2.3.5")
- public void testFieldWithBindingInXmlIgnoresAnnotations()
- {
- assert false;
- }
-
- @SuppressWarnings("unchecked")
- @Test(groups={"injection", "producerMethod"})
- public void testMethodWithBindingAnnotationsOnParametersAreInjected() throws Exception
- {
- Bean<SpiderProducer> spiderProducer = getSimpleBean(SpiderProducer.class);
- manager.addBean(spiderProducer);
- Method method = SpiderProducer.class.getMethod("produceTameTarantula");
- manager.addBean(getProducerMethodBean(method, spiderProducer));
- method = SpiderProducer.class.getMethod("produceSpiderFromInjection", Tarantula.class);
- Bean<Spider> spiderBean = (Bean<Spider>) getProducerMethodBean(method, spiderProducer);
- Spider spider = spiderBean.create();
- assert spider != null;
- assert spider instanceof DefangedTarantula;
- }
-
- @Test(groups={"stub", "injection", "webbeansxml"}) @SpecAssertion(section="2.3.6")
- public void testMethodWithBindingAnnotationsOnParametersDeclaredInXml()
- {
- assert false;
- }
-
- @Test(groups={"stub", "injection", "webbeansxml"}) @SpecAssertion(section="2.3.6")
- public void testMethodWithBindingAnnotationsOnParametersDeclaredInXmlIgnoresAnnotations()
- {
- assert false;
- }
-
- @Test @SpecAssertion(section="4.1")
- public void testBindingTypeDeclaredInheritedIsInherited() throws Exception
- {
- Set<? extends Annotation> bindings = getSimpleBean(BorderCollie.class).getBindings();
- assert bindings.size() == 1;
- assert bindings.iterator().next().annotationType().equals(Hairy.class);
- }
-
- @Test @SpecAssertion(section="4.1")
- public void testBindingTypeNotDeclaredInheritedIsNotInherited()
- {
- Set<? extends Annotation> bindings = getSimpleBean(ShetlandPony.class).getBindings();
- assert bindings.size() == 1;
- assert bindings.iterator().next().annotationType().equals(Current.class);
- }
-
- @Test @SpecAssertion(section="4.1")
- public void testBindingTypeDeclaredInheritedIsBlockedByIntermediateClass()
- {
- Set<? extends Annotation> bindings = getSimpleBean(ClippedBorderCollie.class).getBindings();
- assert bindings.size() == 1;
- Annotation binding = bindings.iterator().next();
- assert binding.annotationType().equals(Hairy.class);
- Hairy hairy = (Hairy) binding;
- assert hairy.clipped();
- }
-
-}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/AnotherScope.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/AnotherScope.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/AnotherScope.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.tests.definition.scope;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+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.webbeans.ScopeType;
+
+ at Target( { TYPE, METHOD, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at ScopeType
+ at interface AnotherScope
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/AnotherScope.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/BorderCollie.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/BorderCollie.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/BorderCollie.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests.definition.scope;
+
+class BorderCollie extends Dog
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/BorderCollie.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Dog.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Dog.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Dog.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.definition.scope;
+
+import javax.webbeans.RequestScoped;
+
+ at RequestScoped
+class Dog
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Dog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/GoldenRetriever.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/GoldenRetriever.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/GoldenRetriever.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests.definition.scope;
+
+class GoldenRetriever extends Retriever
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/GoldenRetriever.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -0,0 +1,8 @@
+package org.jboss.webbeans.tck.tests.definition.scope;
+
+
+ at AnotherScope
+public class Horse
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Horse.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Retriever.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Retriever.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Retriever.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.tests.definition.scope;
+
+import javax.webbeans.ApplicationScoped;
+
+ at ApplicationScoped
+class Retriever extends Dog
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/Retriever.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ScopeTypeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ScopeTypeTest.java 2009-01-15 19:57:27 UTC (rev 995)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ScopeTypeTest.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -9,6 +9,7 @@
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.jboss.webbeans.tck.impl.SpecVersion;
import org.jboss.webbeans.tck.tests.AbstractTest;
+import org.jboss.webbeans.tck.tests.definition.binding.ShetlandPony;
import org.testng.annotations.Test;
@SpecVersion("20081206")
@@ -138,4 +139,22 @@
assert bean.getScopeType().equals(RequestScoped.class);
}
+ @Test @SpecAssertion(section="4.1")
+ public void testScopeTypeDeclaredInheritedIsInherited() throws Exception
+ {
+ assert getSimpleBean(BorderCollie.class).getScopeType().equals(RequestScoped.class);
+ }
+
+ @Test @SpecAssertion(section="4.1")
+ public void testScopeTypeNotDeclaredInheritedIsNotInherited()
+ {
+ assert getSimpleBean(ShetlandPony.class).getScopeType().equals(Dependent.class);
+ }
+
+ @Test @SpecAssertion(section="4.1")
+ public void testScopeTypeDeclaredInheritedIsBlockedByIntermediateClass()
+ {
+ assert getSimpleBean(GoldenRetriever.class).getScopeType().equals(ApplicationScoped.class);
+ }
+
}
\ No newline at end of file
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java 2009-01-15 20:29:44 UTC (rev 996)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.tests.definition.scope;
+
+public class ShetlandPony extends Horse
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/tests/definition/scope/ShetlandPony.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
More information about the weld-commits
mailing list