harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r548934 - in /harmony/enhanced/classlib/trunk/modules/beans: make/exclude.common src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java
Date Wed, 20 Jun 2007 04:58:49 GMT
Author: leoli
Date: Tue Jun 19 21:58:48 2007
New Revision: 548934

URL: http://svn.apache.org/viewvc?view=rev&rev=548934
Log:
1.Add testcase for BeanContextServicesSupport for serviceRevoked method.
2.Remove org.apache.harmony.beans.tests.java.beans.beanContext.BeanContextServicesSupportTest
from exclude tests list.

Modified:
    harmony/enhanced/classlib/trunk/modules/beans/make/exclude.common
    harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java

Modified: harmony/enhanced/classlib/trunk/modules/beans/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/make/exclude.common?view=diff&rev=548934&r1=548933&r2=548934
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/make/exclude.common (original)
+++ harmony/enhanced/classlib/trunk/modules/beans/make/exclude.common Tue Jun 19 21:58:48
2007
@@ -6,4 +6,3 @@
 org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextMembershipEventTest.java
 org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceAvailableEventTest.java
 org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServiceRevokedEventTest.java
-org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java?view=diff&rev=548934&r1=548933&r2=548934
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java
Tue Jun 19 21:58:48 2007
@@ -1267,7 +1267,23 @@
     }
 
     public void testServiceRevoked() {
-        // covered by testRemoveService
+        MockChildBeanContextServicesSupport mockChildBeanContextServicesSupport = new MockChildBeanContextServicesSupport();
+        BeanContextServicesSupport beanContextServicesSupport = new BeanContextServicesSupport();
+        beanContextServicesSupport.add(mockChildBeanContextServicesSupport);
+        BeanContextServiceRevokedEvent beanContextServiceRevokedEvent = new BeanContextServiceRevokedEvent(new
BeanContextServicesSupport(), Collection.class,false);
+        beanContextServicesSupport.serviceRevoked(beanContextServiceRevokedEvent);
+        assertTrue(mockChildBeanContextServicesSupport.revokeCalled);        
+    }
+    
+    public static class MockChildBeanContextServicesSupport extends
+            BeanContextServicesSupport {
+        private static final long serialVersionUID = 1L;
+
+        public boolean revokeCalled = false;
+
+        public void serviceRevoked(BeanContextServiceRevokedEvent bcssre) {
+            revokeCalled = true;
+        }
     }
 
     public void testSerialization() throws IOException, ClassNotFoundException {



Mime
View raw message