commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1679796 - /commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/TestTrackedNodeHandler.java
Date Sat, 16 May 2015 17:51:35 GMT
Author: oheger
Date: Sat May 16 17:51:34 2015
New Revision: 1679796

URL: http://svn.apache.org/r1679796
Log:
Fixed failing test case.

ImmutableNode has been made final; thus, it can no longer be mocked.

Modified:
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/TestTrackedNodeHandler.java

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/TestTrackedNodeHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/TestTrackedNodeHandler.java?rev=1679796&r1=1679795&r2=1679796&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/TestTrackedNodeHandler.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration2/tree/TestTrackedNodeHandler.java
Sat May 16 17:51:34 2015
@@ -69,10 +69,10 @@ public class TestTrackedNodeHandler
     @Test
     public void testGetParent()
     {
-        ImmutableNode node = EasyMock.createMock(ImmutableNode.class);
-        ImmutableNode parent = EasyMock.createMock(ImmutableNode.class);
+        ImmutableNode node = new ImmutableNode.Builder().name("node").create();
+        ImmutableNode parent = new ImmutableNode.Builder().name("parent").create();
         EasyMock.expect(parentHandler.getParent(node)).andReturn(parent);
-        EasyMock.replay(parentHandler, parent, node);
+        EasyMock.replay(parentHandler);
 
         assertSame("Wrong parent node", parent, handler.getParent(node));
         EasyMock.verify(parentHandler);



Mime
View raw message