Author: shane.bryzak(a)jboss.com
Date: 2009-03-16 04:18:31 -0400 (Mon, 16 Mar 2009)
New Revision: 2028
Added:
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/scope/EnglishBorderCollie.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/EnglishBorderCollie.java
Modified:
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/scope/ScopeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
Log:
implemented some more section 4.1 quests
Modified:
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/binding/BindingDefinitionTest.java 2009-03-16
08:12:30 UTC (rev 2027)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/BindingDefinitionTest.java 2009-03-16
08:18:31 UTC (rev 2028)
@@ -157,6 +157,7 @@
}
@Test(groups = { "injection", "producerMethod" })
+ @SpecAssertion(section = "unknown", id = "unknown")
public void testMethodWithBindingAnnotationsOnParametersAreInjected() throws
Exception
{
new RunInDependentContext()
@@ -218,5 +219,14 @@
Hairy hairy = (Hairy) binding;
assert hairy.clipped();
}
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "ag")
+ public void testBindingDeclaredInheritedIsIndirectlyInherited()
+ {
+ Set<? extends Annotation> bindings =
getCurrentManager().resolveByType(EnglishBorderCollie.class, new
HairyBinding(false)).iterator().next().getBindings();
+ assert bindings.size() == 1;
+ assert bindings.iterator().next().annotationType().equals(Hairy.class);
+ }
}
\ No newline at end of file
Added:
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/binding/EnglishBorderCollie.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/binding/EnglishBorderCollie.java 2009-03-16
08:18:31 UTC (rev 2028)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.binding;
+
+class EnglishBorderCollie extends BorderCollie
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/EnglishBorderCollie.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/EnglishBorderCollie.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/EnglishBorderCollie.java 2009-03-16
08:18:31 UTC (rev 2028)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.scope;
+
+class EnglishBorderCollie extends BorderCollie
+{
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java 2009-03-16
08:12:30 UTC (rev 2027)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/scope/ScopeDefinitionTest.java 2009-03-16
08:18:31 UTC (rev 2028)
@@ -108,7 +108,6 @@
@Test @SpecAssertion(section="4.1", id = "ba")
public void testScopeTypeDeclaredInheritedIsInherited() throws Exception
{
- assert getCurrentManager().resolveByType(BorderCollie.class).size() == 1;
assert
getCurrentManager().resolveByType(BorderCollie.class).iterator().next().getScopeType().equals(RequestScoped.class);
}
@@ -132,4 +131,12 @@
assert
getCurrentManager().resolveByType(GoldenLabrador.class).iterator().next().getScopeType().equals(Dependent.class);
}
+ @Test
+ @SpecAssertion(section = "4.1", id = "bc")
+ public void testScopeTypeDeclaredInheritedIsIndirectlyInherited()
+ {
+
+ assert
getCurrentManager().resolveByType(EnglishBorderCollie.class).iterator().next().getScopeType().equals(RequestScoped.class);
+ }
+
}
\ No newline at end of file
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/EnglishBorderCollie.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/EnglishBorderCollie.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/EnglishBorderCollie.java 2009-03-16
08:18:31 UTC (rev 2028)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.definition.stereotype;
+
+class EnglishBorderCollie extends BorderCollie
+{
+
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-03-16
08:12:30 UTC (rev 2027)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/stereotype/StereotypeDefinitionTest.java 2009-03-16
08:18:31 UTC (rev 2028)
@@ -148,7 +148,6 @@
@SpecAssertion(section = "4.1", id = "ab")
public void testStereotypeDeclaredInheritedIsInherited() throws Exception
{
- assert getCurrentManager().resolveByType(BorderCollie.class).size() == 1;
assert
getCurrentManager().resolveByType(BorderCollie.class).iterator().next().getScopeType().equals(RequestScoped.class);
}
@@ -159,5 +158,12 @@
assert getCurrentManager().resolveByType(ShetlandPony.class).size() == 1;
assert
getCurrentManager().resolveByType(ShetlandPony.class).iterator().next().getDeploymentType().equals(Production.class);
}
+
+ @Test
+ @SpecAssertion(section = "4.1", id = "ah")
+ public void testStereotypeDeclaredInheritedIsIndirectlyInherited()
+ {
+ assert
getCurrentManager().resolveByType(EnglishBorderCollie.class).iterator().next().getScopeType().equals(RequestScoped.class);
+ }
}