commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1614991 - in /commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree: AbstractCombinerTest.java TestMergeCombiner.java TestOverrideCombiner.java
Date Thu, 31 Jul 2014 20:10:25 GMT
Author: oheger
Date: Thu Jul 31 20:10:25 2014
New Revision: 1614991

URL: http://svn.apache.org/r1614991
Log:
Removed calls to getRootNode() from test classes for combiners.

Modified:
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/AbstractCombinerTest.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestMergeCombiner.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestOverrideCombiner.java

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/AbstractCombinerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/AbstractCombinerTest.java?rev=1614991&r1=1614990&r2=1614991&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/AbstractCombinerTest.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/AbstractCombinerTest.java
Thu Jul 31 20:10:25 2014
@@ -75,8 +75,10 @@ public abstract class AbstractCombinerTe
         new FileHandler(conf1).load(CONF1);
         XMLConfiguration conf2 = new XMLConfiguration();
         new FileHandler(conf2).load(CONF2);
-        ImmutableNode cn = combiner.combine(conf1.getRootNode(), conf2
-                .getRootNode());
+        ImmutableNode cn =
+                combiner.combine(conf1.getNodeModel().getNodeHandler()
+                        .getRootNode(), conf2.getNodeModel().getNodeHandler()
+                        .getRootNode());
 
         BaseHierarchicalConfiguration result = new BaseHierarchicalConfiguration();
         result.getNodeModel().setRootNode(cn);

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestMergeCombiner.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestMergeCombiner.java?rev=1614991&r1=1614990&r2=1614991&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestMergeCombiner.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestMergeCombiner.java
Thu Jul 31 20:10:25 2014
@@ -178,10 +178,11 @@ public class TestMergeCombiner extends A
         assertEquals("Wrong field", "docname",
                 c.getString("fields.field(1).name"));
 
+        NodeHandler<ImmutableNode> nodeHandler = config.getNodeModel().getNodeHandler();
         List<QueryResult<ImmutableNode>> nds =
-                config.getExpressionEngine().query(config.getRootNode(),
+                config.getExpressionEngine().query(nodeHandler.getRootNode(),
                         "database.tables.table",
-                        config.getNodeModel().getNodeHandler());
+                        nodeHandler);
         assertFalse("No node found", nds.isEmpty());
         assertFalse("Not a node result", nds.get(0).isAttributeResult());
         return nds.get(0).getNode();

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestOverrideCombiner.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestOverrideCombiner.java?rev=1614991&r1=1614990&r2=1614991&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestOverrideCombiner.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/tree/TestOverrideCombiner.java
Thu Jul 31 20:10:25 2014
@@ -167,10 +167,11 @@ public class TestOverrideCombiner extend
         assertEquals("Wrong field", "docname", c
                 .getString("fields.field(1).name"));
 
+        NodeHandler<ImmutableNode> nodeHandler = config.getNodeModel().getNodeHandler();
         List<QueryResult<ImmutableNode>> nds =
-                config.getExpressionEngine().query(config.getRootNode(),
+                config.getExpressionEngine().query(nodeHandler.getRootNode(),
                         "database.tables.table",
-                        config.getNodeModel().getNodeHandler());
+                        nodeHandler);
         assertFalse("No node found", nds.isEmpty());
         assertFalse("An attribute result", nds.get(0).isAttributeResult());
         return nds.get(0).getNode();



Mime
View raw message