openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1397899 - in /openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer: BeanB.java EventTest.java
Date Sat, 13 Oct 2012 17:11:54 GMT
Author: arne
Date: Sat Oct 13 17:11:54 2012
New Revision: 1397899

URL: http://svn.apache.org/viewvc?rev=1397899&view=rev
Log:
OWB-711 Added test for overriding rule for private observer methods

Modified:
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/BeanB.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/EventTest.java

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/BeanB.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/BeanB.java?rev=1397899&r1=1397898&r2=1397899&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/BeanB.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/BeanB.java
Sat Oct 13 17:11:54 2012
@@ -36,10 +36,4 @@ public class BeanB extends Superclass im
     {
         testEvent.addInvocation(getBeanName());
     }
-
-    @Override
-    public String getBeanName()
-    {
-        return super.getBeanName() + ":[subclass]";
-    }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/EventTest.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/EventTest.java?rev=1397899&r1=1397898&r2=1397899&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/EventTest.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/events/observer/EventTest.java
Sat Oct 13 17:11:54 2012
@@ -77,4 +77,21 @@ public class EventTest extends AbstractU
         shutDownContainer();
 
     }
+    
+    @Test
+    public void testPrivateMethodCannotBeOverridden() {
+        Collection<Class<?>> beanClasses = new ArrayList<Class<?>>();
+        beanClasses.add(Superclass.class);
+        beanClasses.add(BeanB.class);
+        startContainer(beanClasses, null);
+
+        PrivateTestEvent testEvent = new PrivateTestEvent();
+        getBeanManager().fireEvent(testEvent);
+
+        Assert.assertEquals(1, testEvent.getCalledObservers().size());
+        Assert.assertEquals("BeanB[Superclass]", testEvent.getCalledObservers().iterator().next());
+
+        shutDownContainer();
+
+    }
 }



Mime
View raw message