commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1609819 - /commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestConfigurationUtils.java
Date Fri, 11 Jul 2014 20:33:19 GMT
Author: oheger
Date: Fri Jul 11 20:33:18 2014
New Revision: 1609819

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

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

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestConfigurationUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestConfigurationUtils.java?rev=1609819&r1=1609818&r2=1609819&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestConfigurationUtils.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestConfigurationUtils.java
Fri Jul 11 20:33:18 2014
@@ -31,11 +31,11 @@ import java.util.List;
 import java.util.Map;
 
 import junitx.framework.ListAssert;
-
 import org.apache.commons.configuration.builder.XMLBuilderParametersImpl;
 import org.apache.commons.configuration.convert.DefaultListDelimiterHandler;
 import org.apache.commons.configuration.event.ConfigurationErrorListener;
-import org.apache.commons.configuration.event.ConfigurationListener;
+import org.apache.commons.configuration.event.ConfigurationEvent;
+import org.apache.commons.configuration.event.EventListener;
 import org.apache.commons.configuration.event.EventSource;
 import org.apache.commons.configuration.ex.ConfigurationRuntimeException;
 import org.apache.commons.configuration.sync.NoOpSynchronizer;
@@ -515,15 +515,16 @@ public class TestConfigurationUtils
     @Test
     public void testAsEventSourceUnsupportedMock()
     {
-        ConfigurationListener cl = EasyMock.createMock(ConfigurationListener.class);
+        @SuppressWarnings("unchecked")
+        EventListener<ConfigurationEvent> cl = EasyMock.createMock(EventListener.class);
         ConfigurationErrorListener el = EasyMock.createMock(ConfigurationErrorListener.class);
         EasyMock.replay(cl, el);
         EventSource source = ConfigurationUtils.asEventSource(this, true);
-        source.addConfigurationListener(cl);
+        source.addEventListener(ConfigurationEvent.ANY, cl);
         source.addErrorListener(el);
-        assertFalse("Wrong result (1)", source.removeConfigurationListener(cl));
+        assertFalse("Wrong result (1)", source.removeEventListener(ConfigurationEvent.ANY,
cl));
         assertFalse("Wrong result (2)", source.removeErrorListener(el));
-        source.addConfigurationListener(null);
+        source.addEventListener(ConfigurationEvent.ANY, null);
     }
 
     /**



Mime
View raw message