openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1667410 - in /openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test: component/event/normal/ComponentWithObserves1.java unittests/event/component/ObserversComponentTest.java
Date Tue, 17 Mar 2015 21:23:46 GMT
Author: struberg
Date: Tue Mar 17 21:23:46 2015
New Revision: 1667410

URL: http://svn.apache.org/r1667410
Log:
OWB-1043 add unit test for multiple events on the same private method

Modified:
    openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java
    openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java

Modified: openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java
URL: http://svn.apache.org/viewvc/openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java?rev=1667410&r1=1667409&r2=1667410&view=diff
==============================================================================
--- openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java
(original)
+++ openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/component/event/normal/ComponentWithObserves1.java
Tue Mar 17 21:23:46 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/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java?rev=1667410&r1=1667409&r2=1667410&view=diff
==============================================================================
--- openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
(original)
+++ openwebbeans/branches/owb_1.2.x/webbeans-impl/src/test/java/org/apache/webbeans/test/unittests/event/component/ObserversComponentTest.java
Tue Mar 17 21:23:46 2015
@@ -79,6 +79,11 @@ public class ObserversComponentTest exte
         ComponentWithObserves1 instance = getManager().getInstance(component);
 
         Assert.assertEquals("Gurkan", instance.getUserName());
+
+        // multiple invocations on the same private observer method. See OWB-1043
+        event = new LoggedInEvent("Mark");
+        getManager().fireEvent(event, anns);
+        Assert.assertEquals("Mark", instance.getUserName());
     }
 
     @Test



Mime
View raw message