commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1609816 - /commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractHierarchicalConfiguration.java
Date Fri, 11 Jul 2014 20:31:58 GMT
Author: oheger
Date: Fri Jul 11 20:31:58 2014
New Revision: 1609816

URL: http://svn.apache.org/r1609816
Log:
Adapted test case to new event listener mechanism.

Modified:
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractHierarchicalConfiguration.java

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractHierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractHierarchicalConfiguration.java?rev=1609816&r1=1609815&r2=1609816&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractHierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestAbstractHierarchicalConfiguration.java
Fri Jul 11 20:31:58 2014
@@ -37,7 +37,8 @@ import java.util.Set;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.configuration.convert.DefaultListDelimiterHandler;
 import org.apache.commons.configuration.event.ConfigurationEvent;
-import org.apache.commons.configuration.event.ConfigurationListener;
+import org.apache.commons.configuration.event.EventListener;
+import org.apache.commons.configuration.event.EventListenerTestImpl;
 import org.apache.commons.configuration.tree.DefaultConfigurationKey;
 import org.apache.commons.configuration.tree.DefaultExpressionEngine;
 import org.apache.commons.configuration.tree.DefaultExpressionEngineSymbols;
@@ -525,18 +526,12 @@ public class TestAbstractHierarchicalCon
     @Test
     public void testCloneWithEventListeners()
     {
-        ConfigurationListener l = new ConfigurationListener()
-        {
-            public void configurationChanged(ConfigurationEvent event)
-            {
-                // just a dummy
-            }
-        };
-        config.addConfigurationListener(l);
+        EventListener<ConfigurationEvent> l = new EventListenerTestImpl(null);
+        config.addEventListener(ConfigurationEvent.ANY, l);
         AbstractHierarchicalConfiguration<?> copy =
                 (AbstractHierarchicalConfiguration<?>) config.clone();
         assertFalse("Event listener registered at clone", copy
-                .getConfigurationListeners().contains(l));
+                .getEventListeners(ConfigurationEvent.ANY).contains(l));
     }
 
     /**



Mime
View raw message