[webbeans-commits] Webbeans SVN: r1583 - in tck/trunk/impl/src/main: resources and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 18:44:50 -0500 (Wed, 18 Feb 2009)
New Revision: 1583
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
mapped scope definition tests to assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-02-18 23:38:41 UTC (rev 1582)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/scope/ScopeDefinitionTest.java 2009-02-18 23:44:50 UTC (rev 1583)
@@ -19,7 +19,7 @@
public class ScopeDefinitionTest extends AbstractDeclarativeTest
{
- @Test @SpecAssertion(section="2.4", id = "unknown")
+ @Test @SpecAssertion(section="2.4", id = "c")
public void testScopeTypesAreExtensible()
{
Bean<Mullet> mullet = createSimpleBean(Mullet.class);
@@ -37,7 +37,7 @@
* TODO This is not really a testable assertion
*/
@Test(groups={"underInvestigation", "annotationDefinition"})
- @SpecAssertion(section="2.4.2", id = "unknown")
+ @SpecAssertion(section="2.4.2", id = "a")
public void testScopeTypeHasCorrectRetention()
{
assert false;
@@ -47,13 +47,13 @@
* TODO If a scope has no scope type annotation, then it is not a scope and cannot be tested
*/
@Test(groups={"underInvestigation", "annotationDefinition"})
- @SpecAssertion(section="2.4.2", id = "unknown")
+ @SpecAssertion(section="2.4.2", id = "b")
public void testScopeTypeDeclaresScopeTypeAnnotation()
{
assert false;
}
- @Test @SpecAssertion(section="2.4.3", id = "unknown")
+ @Test @SpecAssertion(section="2.4.3", id = "a")
public void testScopeDeclaredInJava()
{
Bean<SeaBass> trout = createSimpleBean(SeaBass.class);
@@ -61,13 +61,14 @@
}
@Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="2.4.3", id = "unknown")
+ @SpecAssertion(section="2.4.3", id = "b")
public void testTooManyScopesSpecifiedInJava()
{
createSimpleBean(BeanWithTooManyScopeTypes.class);
}
@Test(expectedExceptions=DefinitionException.class, groups={"stub", "webbeansxml"})
+ @SpecAssertion(section = "2.4.4", id = "b")
public void testTooManyScopesSpecifiedInXml()
{
//Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -78,7 +79,7 @@
}
@Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="2.4.4", id = "unknown")
+ @SpecAssertion(section="2.4.4", id = "a")
public void testScopeDeclaredInXml()
{
//Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -91,7 +92,7 @@
}
@Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="2.4.4", id = "unknown")
+ @SpecAssertion(section="2.4.4", id = "review")
public void testScopeMissingInXml()
{
//Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -103,7 +104,7 @@
}
@Test(groups={"stub", "webbeansxml"})
- @SpecAssertion(section="2.4.4", id = "unknown")
+ @SpecAssertion(section="2.4.4", id = "review")
public void testScopeDeclaredInXmlOverridesJava()
{
//Map<Class<? extends Annotation>, Annotation> annotations = new HashMap<Class<? extends Annotation>, Annotation>();
@@ -114,7 +115,7 @@
assert false;
}
- @Test @SpecAssertion(section="2.4.5", id = "unknown")
+ @Test @SpecAssertion(section="2.4.5", id = "a")
public void testDefaultScope()
{
Bean<Order> order = createSimpleBean(Order.class);
@@ -123,8 +124,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "2.4.5", id = "unknown"),
- @SpecAssertion(section = "2.7.2", id = "unknown")
+ @SpecAssertion(section = "2.4.5", id = "e"),
+ @SpecAssertion(section = "2.7.2", id = "a")
})
public void testScopeSpecifiedAndStereotyped()
{
@@ -133,20 +134,20 @@
}
@Test(expectedExceptions=DefinitionException.class)
- @SpecAssertion(section="2.4.5", id = "unknown")
+ @SpecAssertion(section="2.4.5", id = "d")
public void testMutipleIncompatibleScopeStereotypes()
{
createSimpleBean(Scallop_Broken.class);
}
- @Test @SpecAssertion(section="2.4.5", id = "unknown")
+ @Test @SpecAssertion(section="2.4.5", id = "d")
public void testMutipleIncompatibleScopeStereotypesWithScopeSpecified()
{
Bean<Pollock> pollock = createSimpleBean(Pollock.class);
assert pollock.getScopeType().equals(Dependent.class);
}
- @Test @SpecAssertion(section="2.4.5", id = "unknown")
+ @Test @SpecAssertion(section="2.4.5", id = "c")
public void testMutipleCompatibleScopeStereotypes()
{
Bean<Grayling> grayling = createSimpleBean(Grayling.class);
@@ -155,8 +156,8 @@
@Test
@SpecAssertions({
- @SpecAssertion(section = "2.7.2", id = "unknown"),
- @SpecAssertion(section = "4.1", id = "unknown")
+ @SpecAssertion(section = "2.7.2", id = "d"),
+ @SpecAssertion(section = "4.1", id = "h")
})
public void testWebBeanScopeTypeOverridesStereotype()
{
@@ -164,25 +165,25 @@
assert bean.getScopeType().equals(RequestScoped.class);
}
- @Test @SpecAssertion(section="4.1", id = "unknown")
+ @Test @SpecAssertion(section="4.1", id = "b")
public void testScopeTypeDeclaredInheritedIsInherited() throws Exception
{
assert createSimpleBean(BorderCollie.class).getScopeType().equals(RequestScoped.class);
}
- @Test @SpecAssertion(section="4.1", id = "unknown")
+ @Test @SpecAssertion(section="4.1", id = "b")
public void testScopeTypeNotDeclaredInheritedIsNotInherited()
{
assert createSimpleBean(ShetlandPony.class).getScopeType().equals(Dependent.class);
}
- @Test @SpecAssertion(section="4.1", id = "unknown")
+ @Test @SpecAssertion(section="4.1", id = "b")
public void testScopeTypeDeclaredInheritedIsBlockedByIntermediateScopeTypeMarkedInherited()
{
assert createSimpleBean(GoldenRetriever.class).getScopeType().equals(ApplicationScoped.class);
}
- @Test @SpecAssertion(section="4.1", id = "unknown")
+ @Test @SpecAssertion(section="4.1", id = "b")
public void testScopeTypeDeclaredInheritedIsBlockedByIntermediateScopeTypeNotMarkedInherited()
{
assert createSimpleBean(GoldenLabrador.class).getScopeType().equals(Dependent.class);
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 23:38:41 UTC (rev 1582)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 23:44:50 UTC (rev 1583)
@@ -1997,7 +1997,7 @@
</assertion>
<assertion id="b">
- <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited metaannotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
+ <text>For class X which is extended directly or indirectly by the bean class of a simple or session bean Y, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and neither Y nor any intermediate class that is a subclass of X and a superclass of Y declares a scope type.</text>
</assertion>
<assertion id="c">
@@ -2013,7 +2013,7 @@
</assertion>
<assertion id="f">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited metaannotation and Y does not explicitly declare a scope type using XML.</text>
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X is annotated with a scope type Z then Y inherits the annotation if and only if Z declares the @Inherited meta-annotation and Y does not explicitly declare a scope type using XML.</text>
</assertion>
<assertion id="g">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1582 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 18:38:41 -0500 (Wed, 18 Feb 2009)
New Revision: 1582
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
more explicit about what classes are simple beans
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 22:57:51 UTC (rev 1581)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 23:38:41 UTC (rev 1582)
@@ -206,6 +206,88 @@
</section>
+ <section id="2.4.1" title="Built-in scope types">
+ <assertion id="a">
+ <text>The @RequestScoped, @ApplicationScoped and @SessionScoped annotations defined in Section 8.5, "Context management for built-in scopes" represent the standard scopes defined by the Java Servlets specification</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>The @ConversationScoped annotation represents the conversation scope
+defined in Section 8.5.4, "Conversation context lifecycle".</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The @Dependent pseudo-scope is for dependent objects, as defined in Section 8.3, "Dependent pseudo-scope"</text>
+ </assertion>
+ </section>
+
+ <section id="2.4.2" title="Defining new scope types">
+ <assertion id="a">
+ <text>A scope type is a Java annotation defined as @Target({TYPE, METHOD, FIELD}) and @Retention(RUNTIME)</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>All scope types must specify the @javax.context.ScopeType meta-annotation</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.4.3" title="Declaring the bean scope using annotations">
+ <assertion id="a">
+ <text>The bean's scope is defined by annotating the bean class or producer method or field with a scope type</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A bean class or producer method or field may specify at most one scope type annotation. If a bean class or producer method or field specifies multiple scope type annotations, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A scope type may be specified using a stereotype annotation, as defined in Section 2.7.2, "Declaring the stereotypes for a bean using annotations"</text>
+ </assertion>
+ </section>
+
+ <section id="2.4.4" title="Declaring the bean scope using XML">
+ <assertion id="a">
+ <text>If the bean is declared in beans.xml, the scope may be specified using the scope annotation type name</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If more than one scope type is specified in XML, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A scope type may be specified using a stereotype declared in XML, as defined in Section 2.7.3, "Declaring the stereotypes for a bean using XML"</text>
+ </assertion>
+ </section>
+
+ <section id="2.4.5" title="Default scope">
+ <assertion id="a">
+ <text>When no scope is explicitly declared by annotating the bean class or producer method or field, or by using XML, the scope of a bean is defaulted</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If the bean does not declare any stereotype with a declared default scope, the default scope for the bean is @Dependent</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If all stereotypes declared by the bean that have some declared default scope have the same default scope, then that scope is the default scope for the bean</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>If there are two different stereotypes declared by the bean that declare different default scopes, then there is no default scope and the bean must explicitly declare a scope. If it does not explicitly declare a scope, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If a bean explicitly declares a scope, any default scopes declared by stereotypes are ignored</text>
+ </assertion>
+ </section>
+
+ <section id="2.5" title="Deployment types">
+ <assertion id="a">
+ <text>The set of deployment types is extensible</text>
+ </assertion>
+ </section>
+
<section id="2.5.1" title="Built-in deployment types">
<assertion id="a">
@@ -599,9 +681,12 @@
<assertion id="b">
<text>A top-level Java class is not a simple bean if it is a non-static inner class</text>
</assertion>
- <assertion id="c">
- <text>A top-level Java class is only a simple bean if it is a concrete class.</text>
+ <assertion id="ca">
+ <text>A top-level Java class is not a simple bean if it is an abstract class</text>
</assertion>
+ <assertion id="cb">
+ <text>A top-level Java class is not a simple bean if it is an interface</text>
+ </assertion>
<assertion id="d">
<text>A top-level Java class is only a simple bean if it is annotated @Decorator.</text>
</assertion>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1581 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/definition/stereotype and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 17:57:51 -0500 (Wed, 18 Feb 2009)
New Revision: 1581
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/stereotype/StereotypeDefinitionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
matched context, stereotype and producer method tests to assertions
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java 2009-02-18 22:27:45 UTC (rev 1580)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/context/ContextTest.java 2009-02-18 22:57:51 UTC (rev 1581)
@@ -54,7 +54,7 @@
}
@Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.5", id = "unknown")
+ @SpecAssertion(section = "8.5", id = "review")
public void testGetContextWithNoActiveContextsFails()
{
getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getRequestContext());
@@ -62,7 +62,7 @@
}
@Test(expectedExceptions = { IllegalArgumentException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.5", id = "unknown")
+ @SpecAssertion(section = "8.5", id = "review")
public void testGetContextWithTooManyActiveContextsFails()
{
Context firstContext = new DummyContext()
@@ -77,14 +77,14 @@
}
@Test(expectedExceptions = { ContextNotActiveException.class }, groups = { "manager" })
- @SpecAssertion(section = "8.5", id = "unknown")
+ @SpecAssertion(section = "8.5", id = "review")
public void testGetContextWithNoRegisteredContextsFails()
{
getCurrentManager().getContext(Unregistered.class);
}
@Test(groups = { "manager" })
- @SpecAssertion(section = "8.5", id = "unknown")
+ @SpecAssertion(section = "8.5", id = "review")
public void testGetContextReturnsActiveContext()
{
getCurrentManager().getContext(RequestScoped.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/stereotype/StereotypeDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/stereotype/StereotypeDefinitionTest.java 2009-02-18 22:27:45 UTC (rev 1580)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/definition/stereotype/StereotypeDefinitionTest.java 2009-02-18 22:57:51 UTC (rev 1581)
@@ -37,7 +37,7 @@
* here
*/
@Test(groups = { "underInvestigation", "annotationDefinition" })
- @SpecAssertion(section = "2.7.1", id = "unknown")
+ @SpecAssertion(section = "2.7.1", id = "a")
public void testHasCorrectTarget()
{
assert false;
@@ -48,7 +48,7 @@
* here
*/
@Test(groups = { "underInvestigation", "annotationDefinition" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "2.7.1", id = "unknown")
+ @SpecAssertion(section = "2.7.1", id = "a")
public void testHasCorrectRetention()
{
assert false;
@@ -59,14 +59,14 @@
* isn't one and is difficult to test
*/
@Test(groups = { "underInvestigation", "annotationDefinition" })
- @SpecAssertion(section = "2.7.1", id = "unknown")
+ @SpecAssertion(section = "2.7.1", id = "b")
public void testHasStereotypeAnnotation()
{
assert false;
}
@Test
- @SpecAssertion(section = "2.7.1.1", id = "unknown")
+ @SpecAssertion(section = "2.7.1.1", id = "a")
public void testStereotypeWithScopeType()
{
Bean<Moose> moose = createSimpleBean(Moose.class);
@@ -74,7 +74,7 @@
}
@Test
- @SpecAssertion(section = "2.7.1.1", id = "unknown")
+ @SpecAssertion(section = "2.7.1.1", id = "a")
public void testStereotypeWithoutScopeType()
{
Bean<Reindeer> reindeer = createSimpleBean(Reindeer.class);
@@ -82,7 +82,7 @@
}
@Test( groups = "broken" )
- @SpecAssertion(section = "2.7.1.2", id = "unknown")
+ @SpecAssertion(section = "2.7.1.2", id = "a")
public void testStereotypeWithoutInterceptors()
{
deployBeans(Goldfish.class);
@@ -91,42 +91,43 @@
}
@Test(groups = { "stub", "interceptors" })
- @SpecAssertion(section = "2.7.1.2", id = "unknown")
+ @SpecAssertion(section = "2.7.1.2", id = "b")
public void testStereotypeWithInterceptors()
{
assert false;
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "2.7.1.1", id = "unknown")
+ @SpecAssertion(section = "2.7.1.1", id = "a")
public void testStereotypeWithTooManyScopeTypes()
{
deployBeans(Elk_Broken.class);
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "2.7.1.1", id = "unknown")
+ @SpecAssertion(section = "2.7.1.1", id = "b")
public void testStereotypeWithTooManyDeploymentTypes()
{
deployBeans(Gazelle_Broken.class);
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "2.7.1.3", id = "unknown")
+ @SpecAssertion(section = "2.7.1.3", id = "a")
public void testStereotypeWithNonEmptyNamed()
{
deployBeans(FallowDeer_Broken.class);
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "2.7.1", id = "unknown")
+ @SpecAssertion(section = "2.7.1", id = "d")
public void testStereotypeWithBindingTypes()
{
deployBeans(RoeDeer_Broken.class);
}
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
+ @SpecAssertion(section = "2.7.4", id = "c") })
public void testMultipleStereotypes()
{
Bean<HighlandCow> highlandCow = createSimpleBean(HighlandCow.class);
@@ -137,7 +138,8 @@
}
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
+ @SpecAssertion(section = "2.7.4", id = "c") })
public void testMultipleStereotypesMergesScopes()
{
Bean<Springbok> springbok = createSimpleBean(Springbok.class);
@@ -145,28 +147,31 @@
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
+ @SpecAssertion(section = "2.7.4", id = "c") })
public void testMultipleStereotypesMergesRequiredTypes()
{
deployBeans(Antelope_Broken.class);
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
+ @SpecAssertion(section = "2.7.4", id = "c") })
public void testMultipleStereotypesWithMultipleDeploymentTypes()
{
deployBeans(Goat_Broken.class);
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "e"),
+ @SpecAssertion(section = "2.7.4", id = "c") })
public void testMultipleStereotypesWithMultipleScopeTypes()
{
deployBeans(Deer_Broken.class);
}
@Test(groups = { "stub", "webbeansxml" })
- @SpecAssertion(section = "2.7.3", id = "unknown")
+ @SpecAssertion(section = "2.7.3", id = "a")
public void testStereotypeDeclaredInXmlIgnoresJavaStereotypes()
{
// Map<Class<? extends Annotation>, Annotation> cooXmlAnnotations = new
@@ -190,7 +195,7 @@
}
@Test(groups = { "stub", "webbeansxml" })
- @SpecAssertion(section = "2.7.3", id = "unknown")
+ @SpecAssertion(section = "2.7.3", id = "a")
public void testStereotypeDeclaredInXmlIgnoresJavaBindingTypes()
{
// Map<Class<? extends Annotation>, Annotation> cooXmlAnnotations = new
@@ -213,42 +218,46 @@
}
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "b"),
+ @SpecAssertion(section = "2.7.4", id = "a") })
public void testRequiredTypeIsImplemented()
{
assert createSimpleBean(HighlandCow.class).getTypes().contains(Animal.class);
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "b"),
+ @SpecAssertion(section = "2.7.4", id = "a") })
public void testRequiredTypeIsNotImplemented()
{
deployBeans(Chair_Broken.class);
}
@Test
- @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "a"),
+ @SpecAssertion(section = "2.7.4", id = "b") })
public void testScopeIsSupported()
{
assert createSimpleBean(Goldfish.class).getScopeType().equals(RequestScoped.class);
}
@Test(expectedExceptions = DefinitionException.class)
- @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "unknown"), @SpecAssertion(section = "2.7.4", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.1.4", id = "a"),
+ @SpecAssertion(section = "2.7.4", id = "b") })
public void testScopeIsNotSupported()
{
createSimpleBean(Carp_Broken.class);
}
@Test
- @SpecAssertion(section = "4.1", id = "unknown")
+ @SpecAssertion(section = "4.1", id = "a")
public void testStereotypeDeclaredInheritedIsInherited() throws Exception
{
assert createSimpleBean(BorderCollie.class).getScopeType().equals(RequestScoped.class);
}
@Test
- @SpecAssertion(section = "4.1", id = "unknown")
+ @SpecAssertion(section = "4.1", id = "a")
public void testStereotypeNotDeclaredInheritedIsNotInherited()
{
assert createSimpleBean(ShetlandPony.class).getDeploymentType().equals(Production.class);
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-02-18 22:27:45 UTC (rev 1580)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/method/ProducerMethodDefinitionTest.java 2009-02-18 22:57:51 UTC (rev 1581)
@@ -22,7 +22,7 @@
{
@Test(groups = "producerMethod")
- @SpecAssertion(section = "2.5.3", id = "unknown")
+ @SpecAssertion(section = "2.5.3", id = "g")
public void testProducerMethodInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -33,7 +33,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4", id = "unknown")
+ @SpecAssertion(section = "3.4", id = "b")
public void testStaticMethod() throws Exception
{
Bean<BeanWithStaticProducerMethod> bean = createSimpleBean(BeanWithStaticProducerMethod.class);
@@ -43,14 +43,14 @@
}
@Test(groups = { "stub", "producerMethod", "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.4", id = "unknown")
+ @SpecAssertion(section = "3.4", id = "review")
public void testProducerMethodIsNotBusinessMethod() throws Exception
{
assert false;
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4", id = "unknown")
+ @SpecAssertion(section = "3.4", id = "g")
public void testParameterizedReturnType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -60,7 +60,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.4", id = "unknown")
+ @SpecAssertion(section = "3.4", id = "h")
public void testParameterizedReturnTypeWithWildcard() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -70,7 +70,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.4", id = "unknown")
+ @SpecAssertion(section = "3.4", id = "g")
public void testParameterizedReturnTypeWithTypeParameter() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -80,7 +80,8 @@
}
@Test(groups = "producerMethod")
- @SpecAssertions( { @SpecAssertion(section = "3.4", id = "unknown"), @SpecAssertion(section = "2.3.1", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "3.4", id = "b"),
+ @SpecAssertion(section = "2.3.1", id = "a") })
public void testDefaultBindingType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -92,7 +93,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.1", id = "unknown")
+ @SpecAssertion(section = "3.4.1", id = "c")
public void testApiTypeForClassReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -109,7 +110,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.1", id = "unknown")
+ @SpecAssertion(section = "3.4.1", id = "a")
public void testApiTypeForInterfaceReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -122,7 +123,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.1", id = "unknown")
+ @SpecAssertion(section = "3.4.1", id = "b")
public void testApiTypeForPrimitiveReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -135,7 +136,8 @@
}
@Test(groups = "producerMethod")
- @SpecAssertions( { @SpecAssertion(section = "3.4.1", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "3.4.1", id = "b"),
+ @SpecAssertion(section = "2.2", id = "unknown") })
public void testApiTypeForArrayTypeReturn() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -148,7 +150,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.2", id = "unknown")
+ @SpecAssertion(section = "3.4.2", id = "be")
public void testBindingType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -160,7 +162,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.2", id = "unknown")
+ @SpecAssertion(section = "3.4.2", id = "ba")
public void testScopeType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -173,7 +175,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.2", id = "unknown")
+ @SpecAssertion(section = "3.4.2", id = "bc")
public void testDeploymentType() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -184,7 +186,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.2", id = "unknown")
+ @SpecAssertion(section = "3.4.2", id = "bb")
public void testNamedMethod() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -195,7 +197,7 @@
}
@Test(groups = "producerMethod")
- @SpecAssertion(section = "3.4.2", id = "unknown")
+ @SpecAssertion(section = "3.4.2", id = "bb")
public void testDefaultNamedMethod() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -206,7 +208,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.4", id = "unknown")
+ @SpecAssertion(section = "3.4", id = "review")
public void testProducerMethodWithParameterAnnotatedDisposes() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -216,7 +218,7 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.4", id = "unknown")
+ @SpecAssertion(section = "3.4", id = "review")
public void testProducerMethodWithParameterAnnotatedObserves() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -226,7 +228,9 @@
}
@Test(groups = "producerMethod")
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "3.4.2", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "b"),
+ @SpecAssertion(section = "3.4.2", id = "ba"),
+ @SpecAssertion(section = "2.2", id = "review") })
public void testStereotypeSpecifiesScope() throws Exception
{
Bean<SpiderProducer> bean = createSimpleBean(SpiderProducer.class);
@@ -241,7 +245,9 @@
}
@Test(groups = "producerMethod", expectedExceptions = DefinitionException.class)
- @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "unknown"), @SpecAssertion(section = "3.4.2", id = "unknown"), @SpecAssertion(section = "2.2", id = "unknown") })
+ @SpecAssertions( { @SpecAssertion(section = "2.7.2", id = "b"),
+ @SpecAssertion(section = "3.4.2", id = "bc"),
+ @SpecAssertion(section = "2.2", id = "review") })
public void testStereotypeEnforcesTypes() throws Exception
{
Bean<SpiderProducer_Broken> bean = createSimpleBean(SpiderProducer_Broken.class);
@@ -251,7 +257,7 @@
}
@Test
- @SpecAssertion(section = "4.2", id = "unknown")
+ @SpecAssertion(section = "4.2", id = "d")
public void testNonStaticProducerMethodNotInherited()
{
deployBeans(InfertileChicken.class);
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 22:27:45 UTC (rev 1580)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 22:57:51 UTC (rev 1581)
@@ -1112,10 +1112,26 @@
<text>A producer method may be declared by annotating a method with the @javax.inject.Produces annotation</text>
</assertion>
- <assertion id="b">
- <text>A producer method may also specify scope, name, deployment type, stereotypes and/or bindings</text>
+ <assertion id="ba">
+ <text>A producer method may specify a scope</text>
</assertion>
+ <assertion id="bb">
+ <text>A producer method may specify a name</text>
+ </assertion>
+
+ <assertion id="bc">
+ <text>A producer method may specify a deployment type</text>
+ </assertion>
+
+ <assertion id="bd">
+ <text>A producer method may specify stereotypes</text>
+ </assertion>
+
+ <assertion id="be">
+ <text>A producer method may specify a binding type</text>
+ </assertion>
+
<assertion id="c">
<text>If a producer method is annotated @Initializer, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1580 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 17:27:45 -0500 (Wed, 18 Feb 2009)
New Revision: 1580
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
fix invalid character
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 22:24:22 UTC (rev 1579)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 22:27:45 UTC (rev 1580)
@@ -482,7 +482,7 @@
</assertion>
<assertion id="b">
- <text>Stereotype declarations are transitive � a stereotype declared by a second stereotype is inherited by all beans and other stereotypes that declare the second stereotype</text>
+ <text>Stereotype declarations are transitive - a stereotype declared by a second stereotype is inherited by all beans and other stereotypes that declare the second stereotype</text>
</assertion>
<assertion id="c">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1579 - tck/trunk/impl/src/main/resources.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 17:24:22 -0500 (Wed, 18 Feb 2009)
New Revision: 1579
Modified:
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
oops, make well-formed
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 22:06:50 UTC (rev 1578)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 22:24:22 UTC (rev 1579)
@@ -408,7 +408,7 @@
</section>
- <section 2.7.1" title="Defining new stereotypes">
+ <section id="2.7.1" title="Defining new stereotypes">
<assertion id="a">
<text>A beans stereotype is a Java annotation defined as @Target({TYPE, METHOD, FIELD}), @Target(TYPE), @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}) and @Retention(RUNTIME)</text>
</assertion>
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1578 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 17:06:50 -0500 (Wed, 18 Feb 2009)
New Revision: 1578
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
Log:
minor
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-18 22:06:11 UTC (rev 1577)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-18 22:06:50 UTC (rev 1578)
@@ -220,11 +220,6 @@
assert blackWidowModel.getName().equals("blackWidow");
}
- /**
- * The default name for a producer field is the field name.
- *
- * @throws Exception
- */
@Test(groups = { "producerField" })
@SpecAssertions({
@SpecAssertion(section = "2.6.3", id = "b"),
@@ -239,15 +234,9 @@
assert tarantulaModel.getName().equals("produceTarantula");
}
- /**
- * A producer field may also specify scope, name, deployment type,
- * stereotypes and/or bindings.
- *
- * @throws Exception
- */
@Test(groups = "producerField")
@SpecAssertions({
- @SpecAssertion(section = "2.7.2", id = "unknown"),
+ @SpecAssertion(section = "2.7.2", id = "c"),
@SpecAssertion(section = "3.5.2", id = "e"),
@SpecAssertion(section = "2.2", id = "review")
})
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1577 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/implementation/producer/field and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-02-18 17:06:11 -0500 (Wed, 18 Feb 2009)
New Revision: 1577
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/commonAnnotations/ResourceInjectionTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
completed chapter 2 assertions, mapped more tests
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/commonAnnotations/ResourceInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/commonAnnotations/ResourceInjectionTest.java 2009-02-18 18:41:21 UTC (rev 1576)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/commonAnnotations/ResourceInjectionTest.java 2009-02-18 22:06:11 UTC (rev 1577)
@@ -11,57 +11,29 @@
*/
public class ResourceInjectionTest extends AbstractDeclarativeTest
{
- /**
- * The following functionality is provided by the container when annotations
- * are applied to the bean class of a simple bean:
- *
- * • dependency injection via (@EJB), (@Resource), @PersistenceUnit and
- * @PersistenceContext.
- */
@Test(groups = "stub")
- @SpecAssertion(section = "3.10", id = "unknown")
+ @SpecAssertion(section = "3.10", id = "d")
public void testInjectionOfPersistenceContext()
{
assert false;
}
- /**
- * The following functionality is provided by the container when annotations
- * are applied to the bean class of a simple bean:
- *
- * • dependency injection via (@EJB), (@Resource), @PersistenceUnit and
- * @PersistenceContext.
- */
@Test(groups = "stub")
- @SpecAssertion(section = "3.10", id = "unknown")
+ @SpecAssertion(section = "3.10", id = "c")
public void testInjectionOfPersistenceUnit()
{
assert false;
}
- /**
- * The following functionality is provided by the container when annotations
- * are applied to the bean class of a simple bean:
- *
- * • dependency injection via (@EJB), (@Resource), @PersistenceUnit and
- * @PersistenceContext.
- */
@Test(groups = "stub")
- @SpecAssertion(section = "3.10", id = "unknown")
+ @SpecAssertion(section = "3.10", id = "b")
public void testInjectionOfResource()
{
assert false;
}
- /**
- * The following functionality is provided by the container when annotations
- * are applied to the bean class of a simple bean:
- *
- * • dependency injection via (@EJB), (@Resource), @PersistenceUnit and
- * @PersistenceContext.
- */
@Test(groups = "stub")
- @SpecAssertion(section = "3.10", id = "unknown")
+ @SpecAssertion(section = "3.10", id = "a")
public void testInjectionOfEJB()
{
assert false;
@@ -74,43 +46,28 @@
* • @PostConstruct and @PreDestroy callbacks
*/
@Test(groups = "stub")
- @SpecAssertion(section = "3.10", id = "unknown")
+ @SpecAssertion(section = "3.10", id = "e")
public void testPostConstructCallback()
{
assert false;
}
- /**
- * The following functionality is provided by the container when annotations
- * are applied to the bean class of a simple bean:
- *
- * • @PostConstruct and @PreDestroy callbacks
- */
@Test(groups = "stub")
- @SpecAssertion(section = "3.10", id = "unknown")
+ @SpecAssertion(section = "3.10", id = "f")
public void testPreDestroyCallback()
{
assert false;
}
- /**
- * The following functionality is provided by the container when annotations
- * are applied to the bean class of a simple bean:
- *
- * • interception, as defined in javax.interceptor
- */
@Test(groups = "stub")
- @SpecAssertion(section = "3.10", id = "unknown")
+ @SpecAssertion(section = "3.10", id = "g")
public void testStandardInterceptor()
{
assert false;
}
- /**
- * @PersistenceContext(type=EXTENDED) is not supported for simple beans.
- */
@Test(groups = "stub")
- @SpecAssertion(section = "3.10", id = "unknown")
+ @SpecAssertion(section = "3.10", id = "h")
public void testExtendedPersistenceContextNotSupported()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-18 18:41:21 UTC (rev 1576)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/implementation/producer/field/ProducerFieldDefinitionTest.java 2009-02-18 22:06:11 UTC (rev 1577)
@@ -39,15 +39,8 @@
return Collections.unmodifiableList(Arrays.asList(Standard.class, Production.class, AnotherDeploymentType.class));
}
- /**
- * By default, if no deployment type annotation is explicitly specified, a
- * producer method or field inherits the deployment type of the bean in which
- * it is defined.
- *
- * @throws Exception
- */
@Test(groups = { "producerField" })
- @SpecAssertion(section = "2.5.3", id = "unknown")
+ @SpecAssertion(section = "2.5.3", id = "h")
public void testProducerFieldInheritsDeploymentTypeOfDeclaringWebBean() throws Exception
{
deployBeans(TarantulaProducer.class, TarantulaConsumer.class);
@@ -69,20 +62,14 @@
*/
@Test(groups = { "broken", "producerField", "enterpriseBeans" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.5", id = "unknown")
+ @SpecAssertion(section = "3.5", id = "review")
public void testProducerFieldIsNotBusinessField() throws Exception
{
deployBeans(VibratingSpiderImpl_Broken.class);
}
- /**
- * If the producer field return type is a parameterized type, it must specify
- * actual type parameters for each type parameter.
- *
- * @throws Exception
- */
@Test(groups = "producerField")
- @SpecAssertion(section = "3.5", id = "unknown")
+ @SpecAssertion(section = "3.5", id = "f")
public void testParameterizedReturnType() throws Exception
{
deployBeans(FunnelWeaverSpiderProducer.class, FunnelWeaverSpiderConsumer.class);
@@ -98,26 +85,15 @@
}.run();
}
- /**
- * If the producer field return type is a parameterized type, it must specify
- * actual type parameters for each type parameter. If a producer field return
- * type contains a wildcard type parameter or type variable, a
- * DefinitionException is thrown by the container at deployment time.
- *
- * @throws Exception
- */
@Test(groups = "producerField", expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "3.5", id = "unknown")
+ @SpecAssertion(section = "3.5", id = "g")
public void testParameterizedReturnTypeWithWildcard()
{
deployBeans(SpiderProducerWildCardType_Broken.class);
}
- /**
- * A bean may declare multiple producer fields.
- */
@Test(groups = { "producerField", "deployment" })
- @SpecAssertion(section = "3.5", id = "unknown")
+ @SpecAssertion(section = "3.5", id = "j")
public void testBeanDeclaresMultipleProducerFields()
{
deployBeans(OtherSpiderProducer.class);
@@ -125,7 +101,7 @@
@Test(groups = "producerField")
@SpecAssertions({
- @SpecAssertion(section = "3.5", id = "unknown"),
+ @SpecAssertion(section = "3.5", id = "review"),
@SpecAssertion(section = "2.3.1", id = "unknown")
})
public void testDefaultBindingType()
@@ -136,15 +112,8 @@
assert tarantulaBeans.iterator().next().getBindings().contains(new CurrentBinding());
}
- /**
- * If the field type is a class, the set of bean types contains the field
- * type, every superclass and all interfaces it implements directly or
- * indirectly.
- *
- * @throws Exception
- */
@Test(groups = "producerField")
- @SpecAssertion(section = "3.5.1", id = "unknown")
+ @SpecAssertion(section = "3.5.1", id = "c")
public void testApiTypeForClassReturn()
{
deployBeans(StaticTarantulaProducer.class);
@@ -160,15 +129,8 @@
assert tarantulaModel.getTypes().contains(Object.class);
}
- /**
- * If the field type is an interface, the set of bean types contains the
- * field type, all interfaces it extends directly or indir- ectly and
- * java.lang.Object.
- *
- * @throws Exception
- */
@Test(groups = { "producerField" })
- @SpecAssertion(section = "3.5.1", id = "unknown")
+ @SpecAssertion(section = "3.5.1", id = "a")
public void testApiTypeForInterfaceReturn()
{
deployBeans(SpiderAsAnimalProducer.class);
@@ -180,14 +142,8 @@
assert animalModel.getTypes().contains(Object.class);
}
- /**
- * If a field type is primitive or is a Java array type, the set of bean
- * types contains exactly two types: the field type and java.lang.Object.
- *
- * @throws Exception
- */
@Test(groups = { "producerField" })
- @SpecAssertion(section = "3.5.1", id = "unknown")
+ @SpecAssertion(section = "3.5.1", id = "b")
public void testApiTypeForPrimitiveReturn()
{
deployBeans(OtherSpiderProducer.class);
@@ -199,16 +155,10 @@
assert intModel.getTypes().contains(Object.class);
}
- /**
- * If a field type is primitive or is a Java array type, the set of bean
- * types contains exactly two types: the field type and java.lang.Object.
- *
- * @throws Exception
- */
@Test(groups = { "producerField" })
@SpecAssertions({
- @SpecAssertion(section = "3.5.1", id = "unknown"),
- @SpecAssertion(section = "2.2", id = "unknown")
+ @SpecAssertion(section = "3.5.1", id = "b"),
+ @SpecAssertion(section = "2.2", id = "j")
})
public void testApiTypeForArrayTypeReturn()
{
@@ -221,14 +171,8 @@
assert spidersModel.getTypes().contains(Object.class);
}
- /**
- * A producer field may also specify scope, name, deployment type,
- * stereotypes and/or bindings.
- *
- * @throws Exception
- */
@Test(groups = "producerField")
- @SpecAssertion(section = "3.5.2", id = "unknown")
+ @SpecAssertion(section = "3.5.2", id = "f")
public void testBindingType()
{
deployBeans(TameTarantulaProducer.class);
@@ -239,14 +183,8 @@
assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
}
- /**
- * A producer field may also specify scope, name, deployment type,
- * stereotypes and/or bindings.
- *
- * @throws Exception
- */
@Test(groups = "producerField")
- @SpecAssertion(section = "3.5.2", id = "unknown")
+ @SpecAssertion(section = "3.5.2", id = "b")
public void testScopeType()
{
deployBeans(TameTarantulaProducer.class);
@@ -258,14 +196,8 @@
// TODO Inherit scope from returned web bean?
}
- /**
- * A producer field may also specify scope, name, deployment type,
- * stereotypes and/or bindings.
- *
- * @throws Exception
- */
@Test(groups = "producerField")
- @SpecAssertion(section = "3.5.2", id = "unknown")
+ @SpecAssertion(section = "3.5.2", id = "d")
public void testDeploymentType()
{
deployBeans(TameTarantulaProducer.class);
@@ -275,14 +207,8 @@
assert tarantulaModel.getDeploymentType().equals(Production.class);
}
- /**
- * A producer field may also specify scope, name, deployment type,
- * stereotypes and/or bindings.
- *
- * @throws Exception
- */
@Test(groups = "producerField")
- @SpecAssertion(section = "3.5.2", id = "unknown")
+ @SpecAssertion(section = "3.5.2", id = "c")
public void testNamedField()
{
deployBeans(BlackWidowProducer.class);
@@ -301,8 +227,8 @@
*/
@Test(groups = { "producerField" })
@SpecAssertions({
- @SpecAssertion(section = "2.6.3", id = "unknown"),
- @SpecAssertion(section = "3.5.4", id = "unknown")
+ @SpecAssertion(section = "2.6.3", id = "b"),
+ @SpecAssertion(section = "3.5.4", id = "a")
})
public void testDefaultNamedField()
{
@@ -322,8 +248,8 @@
@Test(groups = "producerField")
@SpecAssertions({
@SpecAssertion(section = "2.7.2", id = "unknown"),
- @SpecAssertion(section = "3.5.2", id = "unknown"),
- @SpecAssertion(section = "2.2", id = "unknown")
+ @SpecAssertion(section = "3.5.2", id = "e"),
+ @SpecAssertion(section = "2.2", id = "review")
})
public void testStereotype()
{
@@ -336,7 +262,7 @@
}
@Test(groups = "producerField")
- @SpecAssertion(section = "4.2", id = "unknown")
+ @SpecAssertion(section = "4.2", id = "k")
public void testNonStaticProducerFieldNotInherited()
{
deployBeans(InfertileChicken.class);
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 18:41:21 UTC (rev 1576)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-18 22:06:11 UTC (rev 1577)
@@ -273,7 +273,7 @@
</assertion>
<assertion id="h">
- <text>By default, if no deployment type annotation is explicitly specified, a field inherits the deployment type of the bean in which it is defined.</text>
+ <text>By default, if no deployment type annotation is explicitly specified, a producer field inherits the deployment type of the bean in which it is defined.</text>
</assertion>
<assertion id="i">
@@ -369,7 +369,7 @@
</assertion>
<assertion id="c">
- <text>A default name must be assigned by the container when a field of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member</text>
+ <text>A default name must be assigned by the container when a producer field of a bean defined using annotations declares a @Named annotation and no name is explicitly specified by the value member</text>
</assertion>
<assertion id="d">
@@ -391,7 +391,7 @@
<section id="2.7" title="Stereotypes">
<assertion id="a">
- <text>A stereotype may also specify that all beans with the stereotype have defaulted bean names</text>
+ <text>A stereotype may specify that all beans with the stereotype have defaulted bean names</text>
</assertion>
<assertion id="b">
@@ -407,7 +407,150 @@
</assertion>
</section>
+
+ <section 2.7.1" title="Defining new stereotypes">
+ <assertion id="a">
+ <text>A beans stereotype is a Java annotation defined as @Target({TYPE, METHOD, FIELD}), @Target(TYPE), @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}) and @Retention(RUNTIME)</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A stereotype may be declared by specifying the @javax.annotation.Stereotype meta-annotation</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>The @Stereotype meta-annotation may be omitted, and the stereotype may be declared in beans.xml</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A stereotype may not declare any binding annotation. If a stereotype declares a binding annotation, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="2.7.1.1" title="Declaring the default scope and deployment type for a stereotype">
+ <assertion id="a">
+ <text>A stereotype may declare at most one scope. If a stereotype declares more than one scope, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A stereotype may declare at most one deployment type. If a stereotype declares more than one deployment type, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+ </section>
+
+ <section id="2.7.1.2" title="Specifying interceptor bindings for a stereotype">
+
+ <assertion id="a">
+ <text>A stereotype may declare zero interceptor bindings</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A stereotype may declare one interceptor binding</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>A stereotype may declare multiple interceptor bindings</text>
+ </assertion>
+
+ </section>
+
+ <section id="2.7.1.3" title="Specifying name defaulting for a stereotype">
+ <assertion id="a">
+ <text>A stereotype may declare an empty @Named annotation. If a stereotype declares a non-empty @Named annotation, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>A stereotype may specify that every bean with the stereotype has a defaulted name when a name is not explicitly specified by the bean</text>
+ </assertion>
+ </section>
+
+ <section id="2.7.1.4" title="Restricting bean scopes and types using a stereotype">
+ <assertion id="a">
+ <text>Bean scopes may be restricted using a stereotype</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Bean types may be restricted using a stereotype</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Scope and type restrictions may not be specified when a stereotype is declared in XML</text>
+ </assertion>
+ </section>
+
+ <section id="2.7.1.5" title="Stereotypes with additional stereotypes">
+ <assertion id="a">
+ <text>A stereotype may declare other stereotypes</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Stereotype declarations are transitive � a stereotype declared by a second stereotype is inherited by all beans and other stereotypes that declare the second stereotype</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target({TYPE, METHOD, FIELD})</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target(METHOD)</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target(FIELD)</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target({METHOD, FIELD})</text>
+ </assertion>
+ </section>
+
+ <section id="2.7.2" title="Declaring the stereotypes for a bean using annotations">
+ <assertion id="a">
+ <text>Stereotype annotations may be applied to a bean class</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Stereotype annotations may be applied to a producer method</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>Stereotype annotations may be applied to a producer field</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>The default deployment type and default scope declared by the stereotype may be overridden by the bean</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>Multiple stereotypes may be applied to the same bean</text>
+ </assertion>
+ </section>
+
+ <section id="2.7.3" title="Declaring the stereotypes for a bean using XML">
+ <assertion id="a">
+ <text>If the bean is declared in beans.xml, stereotypes may be declared using the stereotype annotation type name</text>
+ </assertion>
+ </section>
+
+ <section id="2.7.4" title="Stereotype restrictions">
+ <assertion id="a">
+ <text>If a stereotype declares a requiredType, and the bean types do not include the type, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>If a stereotype explicitly declares a set of scope types using supportedScopes, and the bean scope is not in that set, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="c">
+ <text>If a bean declares multiple stereotypes, it must satisfy every restriction declared by every declared stereotype</text>
+ </assertion>
+ </section>
+
+ <section id="2.7.5" title="Built-in stereotypes">
+ <assertion id="a">
+ <text>The built-in @Model stereotype is intended for use with beans that define the model layer of an MVC web application architecture such as JSF</text>
+ </assertion>
+ </section>
+
<section id="3" title="Bean Implementation">
</section>
@@ -1200,8 +1343,24 @@
</assertion>
<assertion id="b">
- <text>A producer field may also specify scope, name, deployment type, stereotypes and/or bindings</text>
+ <text>A producer field may specify a scope</text>
</assertion>
+
+ <assertion id="c">
+ <text>A producer field may specify a name</text>
+ </assertion>
+
+ <assertion id="d">
+ <text>A producer field may specify a deployment type</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>A producer field may specify stereotypes</text>
+ </assertion>
+
+ <assertion id="f">
+ <text>A producer field may specify bindings</text>
+ </assertion>
</section>
<section id="3.5.3" title="Declaring a producer field using XML">
@@ -1828,7 +1987,7 @@
</assertion>
<assertion id="k">
- <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this method, unless Y is explicitly declared to specialize or realize X.</text>
+ <text>For class X which is the bean class of a simple or session bean Y declared using XML, if X declares a non-static producer field x then Y does not inherit this field, unless Y is explicitly declared to specialize or realize X.</text>
</assertion>
<assertion id="l">
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1576 - in tck/trunk/impl/src: test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-18 13:41:21 -0500 (Wed, 18 Feb 2009)
New Revision: 1576
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ear/EarArtifactDescriptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ear/EjbJarArtifactDescriptor.java
tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/EarArtifactTest.java
Log:
put web-beans.xml in the ejb
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ear/EarArtifactDescriptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ear/EarArtifactDescriptor.java 2009-02-18 18:15:05 UTC (rev 1575)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ear/EarArtifactDescriptor.java 2009-02-18 18:41:21 UTC (rev 1576)
@@ -24,8 +24,8 @@
public EarArtifactDescriptor(Class<?> declaringClass, String beansXmlSourceFileName)
{
- super(declaringClass, beansXmlSourceFileName);
- this.ejbJar = new EjbJarArtifactDescriptor(declaringClass);
+ super(declaringClass, null);
+ this.ejbJar = new EjbJarArtifactDescriptor(declaringClass, beansXmlSourceFileName);
this.war = new WarArtifactDescriptor(declaringClass, null)
{
@@ -94,9 +94,9 @@
}
@Override
- public String getBeansDestination()
+ protected boolean isAddBeansXml()
{
- return "META-INF/web-beans.xml";
+ return false;
}
@Override
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ear/EjbJarArtifactDescriptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ear/EjbJarArtifactDescriptor.java 2009-02-18 18:15:05 UTC (rev 1575)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ear/EjbJarArtifactDescriptor.java 2009-02-18 18:41:21 UTC (rev 1576)
@@ -3,19 +3,19 @@
import java.net.URL;
-import org.jboss.jsr299.tck.impl.packaging.ArtifactDescriptor;
import org.jboss.jsr299.tck.impl.packaging.ResourceDescriptor;
+import org.jboss.jsr299.tck.impl.packaging.jsr299.JSR299ArtifactDescriptor;
-public class EjbJarArtifactDescriptor extends ArtifactDescriptor
+public class EjbJarArtifactDescriptor extends JSR299ArtifactDescriptor
{
public static final String EJB_JAR_XML_DESTINATION = "META-INF/ejb-jar.xml";
public static final String STANDARD_EJB_JAR_XML_FILE_NAME = "org/jboss/jsr299/tck/impl/packaging/ear/ejb-jar.xml";
public static final String CUSTOM_EJB_JAR_XML_FILE_NAME = "org/jboss/jsr299/tck/impl/packaging/ear/custom-ejb-jar.xml";
- public EjbJarArtifactDescriptor(Class<?> declaringClass)
+ public EjbJarArtifactDescriptor(Class<?> declaringClass, String beansXmlSourceFileName)
{
- super(declaringClass);
+ super(declaringClass, beansXmlSourceFileName);
URL ejbJarXml = loadResource(CUSTOM_EJB_JAR_XML_FILE_NAME);
if (ejbJarXml == null)
{
Modified: tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/EarArtifactTest.java
===================================================================
--- tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/EarArtifactTest.java 2009-02-18 18:15:05 UTC (rev 1575)
+++ tck/trunk/impl/src/test/java/org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/EarArtifactTest.java 2009-02-18 18:41:21 UTC (rev 1576)
@@ -64,23 +64,29 @@
File metaInf = new File(root, "META-INF");
assert metaInf.isDirectory();
- assert metaInf.list().length == 3;
+ assert metaInf.list().length == 2;
List<String> metaInfs = Arrays.asList(metaInf.list());
assert metaInfs.contains("application.xml");
- assert metaInfs.contains("web-beans-tck.properties");
- assert metaInfs.contains("web-beans.xml");
-
-
File applicationXml = new File(metaInf, "application.xml");
assert applicationXml.length() > 0;
+ File webBeansTckProperties = new File(metaInf, "web-beans-tck.properties");
+ assert webBeansTckProperties.isFile();
+ assert webBeansTckProperties.length() > 0;
+
File ejbJarRoot = ear.getEjbJar().getExplodedJar();
File ejbJarXml = new File(ejbJarRoot, "META-INF/ejb-jar.xml");
assert ejbJarXml.isFile();
assert ejbJarXml.length() > 0;
+ File webbeansXml = new File(ejbJarRoot, "META-INF/web-beans.xml");
+ assert webbeansXml.isFile();
+ assert webbeansXml.length() == 0;
+
+
+
File currentPackage = getCurrentPackageAsFile(ejbJarRoot);
File[] cowClasses = currentPackage.listFiles(new FilenameFilter()
{
@@ -122,7 +128,6 @@
}
is.close();
assert fileNames.contains("META-INF/application.xml");
- assert fileNames.contains("META-INF/web-beans.xml");
assert fileNames.contains("META-INF/web-beans-tck.properties");
assert fileNames.contains("lib/tck-support.jar");
assert fileNames.contains(DummyTest.class.getName() + ".jar");
@@ -141,6 +146,7 @@
}
is.close();
assert fileNames.contains("META-INF/ejb-jar.xml");
+ assert fileNames.contains("META-INF/web-beans.xml");
assert fileNames.contains("org/jboss/jsr299/tck/test/impl/packaging/descriptors/ear/Cow.class");
}
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1575 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event.
by webbeans-commits@lists.jboss.org
Author: dallen6
Date: 2009-02-18 13:15:05 -0500 (Wed, 18 Feb 2009)
New Revision: 1575
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/Pomeranian.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/PomeranianInterface.java
Log:
Fixed the interface for one of the test EJBs.
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-18 17:49:01 UTC (rev 1574)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-18 18:15:05 UTC (rev 1575)
@@ -17,6 +17,8 @@
package org.jboss.jsr299.tck.integration.event;
+import static org.jboss.jsr299.tck.impl.packaging.PackagingType.EAR;
+
import java.util.Set;
import javax.event.Observer;
@@ -27,7 +29,6 @@
import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.jboss.jsr299.tck.impl.packaging.IntegrationTest;
import org.jboss.jsr299.tck.impl.packaging.Packaging;
-import org.jboss.jsr299.tck.impl.packaging.PackagingType;
import org.testng.annotations.Test;
/**
@@ -39,8 +40,8 @@
*
*/
@Artifact
+@Packaging(EAR)
@IntegrationTest
-(a)Packaging(PackagingType.EAR)
public class EventTest extends AbstractDeclarativeTest
{
@Test(groups = { "stub", "events", "integration" })
@@ -61,8 +62,8 @@
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
{
- Pomeranian dog = (Pomeranian) getCurrentManager().getInstanceByName("Teddy");
- Agent dogAgent = getCurrentManager().getInstanceByType(DogAgent.class);
+ PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
+ Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
dogAgent.sendOutsideTransaction("event");
}
@@ -70,7 +71,7 @@
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testAfterTransactionCompletionObserver()
{
- Agent dogAgent = getCurrentManager().getInstanceByType(DogAgent.class);
+ Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
dogAgent.sendInTransaction("event");
}
@@ -78,7 +79,7 @@
@SpecAssertion(section = "7.5.6", id = "unknown")
public void testAfterTransactionSuccessObserver()
{
- Agent dogAgent = getCurrentManager().getInstanceByType(DogAgent.class);
+ Agent dogAgent = getCurrentManager().getInstanceByType(Agent.class);
dogAgent.sendInTransaction(new Integer(4));
}
@@ -129,14 +130,14 @@
@SpecAssertion(section = "7.5.8", id = "unknown")
public void testEnterpriseBeanObserverMethodCalledWithCallerContext()
{
- Set<Bean<Pomeranian>> beans = getCurrentManager().resolveByType(Pomeranian.class);
+ Set<Bean<PomeranianInterface>> beans = getCurrentManager().resolveByType(PomeranianInterface.class);
assert !beans.isEmpty();
String event = "A new event";
Set<Observer<String>> observers = getCurrentManager().resolveObservers(event);
assert observers.size() == 1;
getCurrentManager().fireEvent(event);
- Pomeranian dog = (Pomeranian) getCurrentManager().getInstanceByName("Teddy");
+ PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
}
@Test(groups = { "stub", "events", "integration" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/Pomeranian.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/Pomeranian.java 2009-02-18 17:49:01 UTC (rev 1574)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/Pomeranian.java 2009-02-18 18:15:05 UTC (rev 1575)
@@ -1,10 +1,15 @@
package org.jboss.jsr299.tck.integration.event;
+import static javax.ejb.TransactionManagementType.BEAN;
+import static javax.transaction.Status.STATUS_COMMITTED;
+import static javax.transaction.Status.STATUS_ROLLEDBACK;
+
import java.math.BigInteger;
import javax.annotation.Named;
import javax.annotation.Resource;
import javax.ejb.EJBException;
+import javax.ejb.Local;
import javax.ejb.SessionContext;
import javax.ejb.Stateful;
import javax.ejb.TransactionManagement;
@@ -15,19 +20,9 @@
import javax.transaction.SystemException;
import javax.transaction.UserTransaction;
-import static javax.ejb.TransactionManagementType.BEAN;
-import static javax.transaction.Status.STATUS_ACTIVE;
-import static javax.transaction.Status.STATUS_COMMITTED;
-import static javax.transaction.Status.STATUS_COMMITTING;
-import static javax.transaction.Status.STATUS_MARKED_ROLLBACK;
-import static javax.transaction.Status.STATUS_NO_TRANSACTION;
-import static javax.transaction.Status.STATUS_PREPARED;
-import static javax.transaction.Status.STATUS_PREPARING;
-import static javax.transaction.Status.STATUS_ROLLEDBACK;
-import static javax.transaction.Status.STATUS_ROLLING_BACK;
-
@Stateful
+(a)Local(PomeranianInterface.class)
@Tame
@Named("Teddy")
@TransactionManagement(BEAN)
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/PomeranianInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/PomeranianInterface.java 2009-02-18 17:49:01 UTC (rev 1574)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/PomeranianInterface.java 2009-02-18 18:15:05 UTC (rev 1575)
@@ -1,6 +1,42 @@
package org.jboss.jsr299.tck.integration.event;
+import java.math.BigInteger;
+
+import javax.event.AfterTransactionCompletion;
+import javax.event.AfterTransactionFailure;
+import javax.event.AfterTransactionSuccess;
+import javax.event.Observes;
+
public interface PomeranianInterface
{
-
+ /**
+ * Observes a String event only after the transaction is completed.
+ *
+ * @param someEvent
+ */
+ public void observeStringEvent(@Observes @AfterTransactionCompletion String someEvent);
+
+ /**
+ * Observes an Integer event if the transaction is successfully completed.
+ *
+ * @param event
+ */
+ public void observeIntegerEvent(@Observes @AfterTransactionSuccess Integer event);
+
+ /**
+ * Observes a Float event only if the transaction failed.
+ *
+ * @param event
+ */
+ public void observeFloatEvent(@Observes @AfterTransactionFailure Float event);
+
+ public void observeBigIntegerEvent(@Observes BigInteger event);
+
+ public boolean isCorrectContext();
+
+ public void setCorrectContext(boolean correctContext);
+
+ public boolean isCorrectTransactionState();
+
+ public void setCorrectTransactionState(boolean correctTransactionState);
}
17 years, 1 month
[webbeans-commits] Webbeans SVN: r1574 - in tck/trunk/impl/src/main/java/org/jboss/jsr299/tck: impl/runner and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-02-18 12:49:01 -0500 (Wed, 18 Feb 2009)
New Revision: 1574
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/RemoveExpectedExceptionsAnnotationTransformer.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/runner/TestRunner.java
Log:
pass expected exceptions to the client!
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-18 16:52:33 UTC (rev 1573)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-02-18 17:49:01 UTC (rev 1574)
@@ -253,6 +253,7 @@
if (result.getStatus().equals(Status.FAILED) || result.getStatus().equals(Status.SKIPPED))
{
testResult.setThrowable(result.getThrowable());
+ testResult.setStatus(ITestResult.FAILURE);
}
}
catch (IOException e)
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/runner/TestRunner.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/runner/TestRunner.java 2009-02-18 16:52:33 UTC (rev 1573)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/runner/TestRunner.java 2009-02-18 17:49:01 UTC (rev 1574)
@@ -4,6 +4,7 @@
import java.util.List;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.testng.RemoveExpectedExceptionsAnnotationTransformer;
import org.jboss.jsr299.tck.impl.util.DeploymentProperties;
import org.testng.ITestContext;
import org.testng.ITestResult;
@@ -53,6 +54,7 @@
List<XmlSuite> xmlSuites = new ArrayList<XmlSuite>();
testNG.setXmlSuites(xmlSuites);
xmlSuites.add(createSuite());
+ testNG.setAnnotationTransformer(new RemoveExpectedExceptionsAnnotationTransformer());
testNG.run();
this.context = listener.getContext();
this.testResults = listener.getTestResults();
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/RemoveExpectedExceptionsAnnotationTransformer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/RemoveExpectedExceptionsAnnotationTransformer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/RemoveExpectedExceptionsAnnotationTransformer.java 2009-02-18 17:49:01 UTC (rev 1574)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.impl.testng;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import org.testng.internal.annotations.IAnnotationTransformer;
+import org.testng.internal.annotations.ITest;
+
+public class RemoveExpectedExceptionsAnnotationTransformer implements IAnnotationTransformer
+{
+
+ public void transform(ITest arg0, Class arg1, Constructor arg2, Method arg3)
+ {
+ arg0.setExpectedExceptions(new Class<?>[0]);
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/testng/RemoveExpectedExceptionsAnnotationTransformer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month