You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by le...@apache.org on 2007/06/20 06:58:49 UTC
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
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 {