openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1667466 - in /openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test: component/event/normal/ComponentWithObserves1.java unittests/event/component/ObserversComponentTest.java
Date Wed, 18 Mar 2015 08:23:01 GMT
Author: struberg
Date: Wed Mar 18 08:23:00 2015
New Revision: 1667466

URL: http://svn.apache.org/r1667466
Log:
OWB-1043 add unit test for multiple events on same private observer methods 

Modified:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java?rev=1667466&r1=1667465&r2=1667466&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java
Wed Mar 18 08:23:00 2015
@@ -32,7 +32,7 @@ public class ComponentWithObserves1
 
     private String userNameWithMember;
 
-    public void afterLoggedIn(@Observes @Any LoggedInEvent event)
+    private void afterLoggedIn(@Observes @Any LoggedInEvent event)
     {
         this.userName = event.getUserName();
     }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java?rev=1667466&r1=1667465&r2=1667466&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
Wed Mar 18 08:23:00 2015
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.webbeans.test.unittests.event.component;
+package org.apache.webbeans.svtest.unittests.event.component;
 
 import javax.enterprise.util.AnnotationLiteral;
 
@@ -57,6 +57,10 @@ public class ObserversComponentTest exte
         ComponentWithObserves1 instance = getInstance(ComponentWithObserves1.class);
 
         Assert.assertEquals("Gurkan", instance.getUserName());
+
+        event = new LoggedInEvent("Mark");
+        getBeanManager().fireEvent(event, AnyLiteral.INSTANCE);
+        Assert.assertEquals("Mark", instance.getUserName());
     }
 
     @Test



Mime
View raw message