[webbeans-commits] Webbeans SVN: r421 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Fri Dec 5 16:52:51 EST 2008


Author: gavin.king at jboss.com
Date: 2008-12-05 16:52:51 -0500 (Fri, 05 Dec 2008)
New Revision: 421

Modified:
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java
Log:
further test

Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java	2008-12-05 21:50:03 UTC (rev 420)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ObserverTest.java	2008-12-05 21:52:51 UTC (rev 421)
@@ -75,7 +75,7 @@
    public final void testNotify() throws Exception
    {
 	  SampleEvent event = new SampleEvent();
-      assert notified == false;
+	  notified = false;
       observer.notify(event);
       assert notified == true;
    }
@@ -83,14 +83,18 @@
    @Test(groups = "observerMethod") @SpecAssertion(section={"7.5.7"})
    public final void testNotifyViaManager() throws Exception
    {
-	  SampleEvent event = new SampleEvent();
+	  notified = false;
+      manager.fireEvent(new SampleEvent());
       assert notified == false;
-      manager.fireEvent(event);
+      manager.fireEvent(new Object(), new AnnotationLiteral<Asynchronous>() {});
       assert notified == false;
-      manager.fireEvent(event, new AnnotationLiteral<Foo>() {});
+      manager.fireEvent(new SampleEvent(), new AnnotationLiteral<Foo>() {});
       assert notified == false;
-      manager.fireEvent(event, new AnnotationLiteral<Asynchronous>() {});
+      manager.fireEvent(new SampleEvent(), new AnnotationLiteral<Asynchronous>() {});
       assert notified == true;
+      notified = false;
+      manager.fireEvent(new SampleEvent(), new AnnotationLiteral<Asynchronous>() {}, new AnnotationLiteral<Foo>() {});
+      assert notified == true;
    }
 
 }




More information about the weld-commits mailing list