[webbeans-commits] Webbeans SVN: r1721 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/unit/event and 6 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Thu Feb 26 10:46:00 EST 2009
Author: dallen6
Date: 2009-02-26 10:46:00 -0500 (Thu, 26 Feb 2009)
New Revision: 1721
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/unit/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer1/EJBObserverMethodNotBusinessMethodTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer7/TransactionalObserverMethodOnlyOnePhaseTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer8/AsynchronousBeforeCompletionObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer9/AsynchronousConditionalObserverTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer2/ManagerRemoveObserverTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
A bit more test coverage for event tests (Section 7)
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-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/integration/event/EventTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -28,6 +28,7 @@
import javax.inject.manager.Bean;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.jboss.jsr299.tck.impl.packaging.IntegrationTest;
@@ -47,9 +48,11 @@
@IntegrationTest
public class EventTest extends AbstractDeclarativeTest
{
-
- private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>() {};
-
+
+ private static final Annotation TAME_LITERAL = new AnnotationLiteral<Tame>()
+ {
+ };
+
@Test(groups = { "stub", "events", "integration" })
@SpecAssertion(section = "7.4", id = "d")
public void testObserverCalledBeforeTransactionCompleteMaySetRollbackOnly()
@@ -79,7 +82,7 @@
}
@Test(groups = { "events", "integration", "broken" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertion(section = "7.5.6", id = "a")
public void testTransactionalObserverNotifiedImmediatelyWhenNoTransactionInProgress()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -92,7 +95,7 @@
}
@Test(groups = { "events", "integration", "broken" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "c"), @SpecAssertion(section = "7.5.6", id = "f"), @SpecAssertion(section = "7.5.6", id = "i") })
public void testAfterTransactionCompletionObserver()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -106,7 +109,7 @@
}
@Test(groups = { "events", "integration", "broken" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "d"), @SpecAssertion(section = "7.5.6", id = "j") })
public void testAfterTransactionSuccessObserver()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -117,7 +120,7 @@
}
@Test(groups = { "events", "integration", "broken" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "e"), @SpecAssertion(section = "7.5.6", id = "k") })
public void testAfterTransactionFailureObserver()
{
PomeranianInterface dog = (PomeranianInterface) getCurrentManager().getInstanceByName("Teddy");
@@ -127,12 +130,19 @@
}
@Test(groups = { "stub", "events", "integration" })
- @SpecAssertion(section = "7.5.6", id = "unknown")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "b"), @SpecAssertion(section = "7.5.6", id = "h") })
public void testBeforeTransactionCompletionObserver()
{
assert false;
}
+ @Test(groups = { "stub", "events", "integration" })
+ @SpecAssertions( { @SpecAssertion(section = "7.5.6", id = "g") })
+ public void testTransactionalObserverDefinedByXML()
+ {
+ assert false;
+ }
+
/**
* If the observer method is an asynchronous transactional observer method
* and there is currently a JTA transaction in progress, the observer object
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/EventTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -245,7 +245,7 @@
}
@Test(groups = { "events" })
- @SpecAssertion(section = "7.5", id = "a")
+ @SpecAssertions( { @SpecAssertion(section = "7.5", id = "a"), @SpecAssertion(section = "7.5.2", id = "a")} )
public void testObserverMethodAutomaticallyRegistered()
{
assert !getCurrentManager().resolveObservers("event").isEmpty();
@@ -301,7 +301,7 @@
}
@Test(groups = { "stub", "events", "webbeansxml" })
- @SpecAssertion(section = "7.5.3", id = "b")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.3", id = "a"), @SpecAssertion(section = "7.5.3", id = "b") } )
public void testXMLDefinedObserverMethodIgnoresBindingAnnotations()
{
assert false;
@@ -336,7 +336,7 @@
// TODO This test was working well in January 2009 but no longer creates the
// observer
@Test(groups = { "events", "broken" })
- @SpecAssertion(section = "7.5.5", id = "a")
+ @SpecAssertions( { @SpecAssertion(section = "7.5.5", id = "a"), @SpecAssertion(section = "7.5.5", id = "b")} )
public void testConditionalObserver() throws Exception
{
RecluseSpider.notified = false;
@@ -361,6 +361,13 @@
}.run();
}
+ @Test(groups = { "events", "stub" })
+ @SpecAssertions( { @SpecAssertion(section = "7.5.5", id = "c") } )
+ public void testConditionalObserverDefinedByXML()
+ {
+ assert false;
+ }
+
@Test(groups = { "stub", "events" })
@SpecAssertion(section = "7.5.7", id = "a")
public void testAsynchronousObserverIsAsynchronous()
@@ -369,14 +376,14 @@
}
@Test(groups = { "stub", "events", "webbeansxml" })
- @SpecAssertion(section = "7.5.7", id = "a")
+ @SpecAssertion(section = "7.5.7", id = "b")
public void testAsynchronousObserverDeclaredByXML()
{
assert false;
}
@Test(groups = { "stub", "events" })
- @SpecAssertion(section = "7.5.7", id = "b")
+ @SpecAssertion(section = "7.5.7", id = "c")
public void testAsynchronousObserverAlsoTransactional()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer1/EJBObserverMethodNotBusinessMethodTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer1/EJBObserverMethodNotBusinessMethodTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer1/EJBObserverMethodNotBusinessMethodTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -20,6 +20,7 @@
import javax.inject.DefinitionException;
import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.jboss.jsr299.tck.impl.packaging.ExpectedDeploymentException;
@@ -40,7 +41,7 @@
public class EJBObserverMethodNotBusinessMethodTest extends AbstractDeclarativeTest
{
@Test(groups = { "events" })
- @SpecAssertion(section = "7.5", id = "d")
+ @SpecAssertions( { @SpecAssertion(section = "7.5", id = "d"), @SpecAssertion(section = "7.5.2", id = "f")} )
public void testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer7/TransactionalObserverMethodOnlyOnePhaseTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer7/TransactionalObserverMethodOnlyOnePhaseTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer7/TransactionalObserverMethodOnlyOnePhaseTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -37,7 +37,7 @@
public class TransactionalObserverMethodOnlyOnePhaseTest extends AbstractDeclarativeTest
{
@Test(groups = { "events" })
- @SpecAssertion(section = "7.5.6", id = "k")
+ @SpecAssertion(section = "7.5.6", id = "l")
public void testTransactionalObserverCanOnlyObserveSinglePhase()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer8/AsynchronousBeforeCompletionObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer8/AsynchronousBeforeCompletionObserverTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer8/AsynchronousBeforeCompletionObserverTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -37,7 +37,7 @@
public class AsynchronousBeforeCompletionObserverTest extends AbstractDeclarativeTest
{
@Test(groups = { "events", "broken" })
- @SpecAssertion(section = "7.5.7", id = "c")
+ @SpecAssertion(section = "7.5.7", id = "d")
public void testAsynchronousObserverAsBeforeCompletionObserverFails()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer9/AsynchronousConditionalObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer9/AsynchronousConditionalObserverTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/broken/observer9/AsynchronousConditionalObserverTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -37,7 +37,7 @@
public class AsynchronousConditionalObserverTest extends AbstractDeclarativeTest
{
@Test(groups = { "events", "broken" })
- @SpecAssertion(section = "7.5.7", id = "c")
+ @SpecAssertion(section = "7.5.7", id = "e")
public void testAsynchronousObserverAsConditionalObserverFails()
{
assert false;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer2/ManagerRemoveObserverTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer2/ManagerRemoveObserverTest.java 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/unit/event/register/observer2/ManagerRemoveObserverTest.java 2009-02-26 15:46:00 UTC (rev 1721)
@@ -25,6 +25,7 @@
import org.hibernate.tck.annotations.SpecAssertion;
import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
import org.testng.annotations.Test;
/**
@@ -33,6 +34,7 @@
* @author David Allen
*
*/
+ at Artifact
public class ManagerRemoveObserverTest extends AbstractDeclarativeTest
{
public static class AnEventType
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-26 15:44:39 UTC (rev 1720)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-02-26 15:46:00 UTC (rev 1721)
@@ -3849,42 +3849,54 @@
</assertion>
<assertion id="f">
- <text>A transactional observer method may be declared by annotating the event parameter of the observer method or in XML by a child element of the <Observes> element</text>
+ <text>A transactional observer method may be declared by ~annotating the event parameter of the observer method~ or in XML by a child element of the <Observes> element</text>
</assertion>
<assertion id="g">
+ <text>A transactional observer method may be declared by annotating the event parameter of the observer method or ~in XML by a child element of the <Observes> element~</text>
+ </assertion>
+
+ <assertion id="h">
<text>The @javax.event.BeforeTransactionCompletion annotation or <BeforeTransactionCompletion> element specifies that the observer method is a before completion observer method</text>
</assertion>
- <assertion id="h">
+ <assertion id="i">
<text>The @javax.event.AfterTransactionCompletion annotation or <AfterTransactionCompletion> element specifies that the observer method is an after completion observer method</text>
</assertion>
- <assertion id="i">
+ <assertion id="j">
<text>The @javax.event.AfterTransactionSuccess annotation or <AfterTransactionSuccess> element specifies that the observer method is an after success observer method</text>
</assertion>
- <assertion id="j">
+ <assertion id="k">
<text>The @javax.event.AfterTransactionFailure annotation or <AfterTransactionFailure> element specifies that the observer method is an after failure observer method</text>
</assertion>
- <assertion id="k">
+ <assertion id="l">
<text>A transactional observer method may not specify more than one of the four types. If a transactional observer method specifies more than one of the four types, a DefinitionException is thrown by the container at deployment time</text>
</assertion>
</section>
<section id="7.5.7" title="Asynchronous observer methods">
<assertion id="a">
- <text>An asynchronous observer method may be declared by annotating the event parameter of the observer method @javax.event.Asynchronously or in XML by a child <Asynchronously> element of the <Observes> element</text>
+ <text>An asynchronous observer method may be declared by ~annotating the event parameter of the observer method @javax.event.Asynchronously~ or in XML by a child <Asynchronously> element of the <Observes> element</text>
</assertion>
<assertion id="b">
- <text>An asynchronous observer method may also be a transactional observer method</text>
+ <text>An asynchronous observer method may be declared by annotating the event parameter of the observer method @javax.event.Asynchronously or ~in XML by a child <Asynchronously> element of the <Observes> element~</text>
</assertion>
<assertion id="c">
- <text>If an asynchronous observer method is also a transactional observer method, it may not be a before completion observer method or a conditional observer method. If an asynchronous observer method is specified as a before completion or conditional observer method, a DefinitionException is thrown by the container at deployment time</text>
+ <text>An asynchronous observer method may also be a transactional observer method</text>
</assertion>
+
+ <assertion id="d">
+ <text>If an asynchronous observer method is also a transactional observer method, it ~may not be a before completion observer method~ or a conditional observer method. If an asynchronous observer method is specified as a before completion or conditional observer method, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
+
+ <assertion id="e">
+ <text>If an asynchronous observer method is also a transactional observer method, it may not be a before completion observer method or a ~conditional observer method~. If an asynchronous observer method is specified as a before completion or conditional observer method, a DefinitionException is thrown by the container at deployment time</text>
+ </assertion>
</section>
<section id="7.5.8" title="Observer object for an observer method">
More information about the weld-commits
mailing list