Author: dallen6
Date: 2009-07-27 16:49:52 -0400 (Mon, 27 Jul 2009)
New Revision: 3291
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Volume.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BindingTypeNotRuntime.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/bindingTypes/EventBindingTypesTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Marked tests related to non-runtime retention bindings ri-broken; added new test for just
the @Any binding on observers
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BindingTypeNotRuntime.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BindingTypeNotRuntime.java 2009-07-27
20:22:12 UTC (rev 3290)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/BindingTypeNotRuntime.java 2009-07-27
20:49:52 UTC (rev 3291)
@@ -2,12 +2,15 @@
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.SOURCE;
+import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import javax.enterprise.inject.BindingType;
@Target( { FIELD, PARAMETER })
+@Retention(SOURCE)
@BindingType
@interface BindingTypeNotRuntime
{
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-07-27
20:22:12 UTC (rev 3290)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2009-07-27
20:49:52 UTC (rev 3291)
@@ -330,9 +330,8 @@
Set<ObserverMethod<?, StockPrice>> observers =
getCurrentManager().resolveObserverMethods(new StockPrice());
assert observers.size() == 1;
ObserverMethod<?, ?> observerMethod = observers.iterator().next();
- assert observerMethod.getObservedBindings().size() == 2;
+ assert observerMethod.getObservedBindings().size() == 1;
assert observerMethod.getObservedBindings().contains(new CurrentLiteral());
- assert observerMethod.getObservedBindings().contains(new AnyLiteral());
}
@Test(groups = { "events" })
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java 2009-07-27
20:22:12 UTC (rev 3290)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/StockWatcher.java 2009-07-27
20:49:52 UTC (rev 3291)
@@ -1,10 +1,12 @@
package org.jboss.jsr299.tck.tests.event;
import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Any;
class StockWatcher
{
private static Class<?> observerClazz;
+ private static boolean anyVolumeObserved = false;
public void observeStockPrice(@Observes StockPrice price)
{
@@ -12,8 +14,23 @@
price.recordVisit(this);
}
+ public void observeAllVolume(@Observes @Any Volume volume)
+ {
+ anyVolumeObserved = true;
+ }
+
public static Class<?> getObserverClazz()
{
return observerClazz;
}
+
+ public static boolean isAnyVolumeObserved()
+ {
+ return anyVolumeObserved;
+ }
+
+ public static void setAnyVolumeObserved(boolean anyStockPriceObserved)
+ {
+ StockWatcher.anyVolumeObserved = anyStockPriceObserved;
+ }
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Volume.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Volume.java
(rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Volume.java 2009-07-27
20:49:52 UTC (rev 3291)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.event;
+
+class Volume
+{
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/Volume.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/bindingTypes/EventBindingTypesTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/bindingTypes/EventBindingTypesTest.java 2009-07-27
20:22:12 UTC (rev 3290)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/bindingTypes/EventBindingTypesTest.java 2009-07-27
20:49:52 UTC (rev 3291)
@@ -56,7 +56,7 @@
assert observer.getNumTimesNonRuntimeBindingTypeObserved() == 2;
}
- @Test(groups = { "events" }, expectedExceptions = {
IllegalArgumentException.class } )
+ @Test(groups = { "events", "ri-broken" }, expectedExceptions = {
IllegalArgumentException.class } )
@SpecAssertion(section = "10.1", id = "f")
public void testFireEventWithNonRuntimeBindingTypeFails()
{
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-27 20:22:12 UTC (rev 3290)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-07-27 20:49:52 UTC (rev 3291)
@@ -3951,8 +3951,9 @@
<text>When an event is fired by the application, the container must determine
the observers for that event according to the observer resolution defined by Section 10.2,
"Observer resolution", then then for each observer method, either invoke the
observer method immediately or register the observer method for later invocation during
the transaction completion phase, using a JTA |Synchronization|.</text>
</assertion>
- <assertion id="b">
+ <assertion id="b" testable="false">
<text>The order in which observers are called in not defined, and so portable
applications should not rely upon the order in which observers are called.</text>
+ <note>Behavior is not defined.</note>
</assertion>
<assertion id="bb">
Show replies by date