You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/05/16 09:37:24 UTC

svn commit: r1103635 - /commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRule.java

Author: simonetripodi
Date: Mon May 16 07:37:24 2011
New Revision: 1103635

URL: http://svn.apache.org/viewvc?rev=1103635&view=rev
Log:
added missing TestRuleProvider, missing from previous commit

Modified:
    commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRule.java

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRule.java?rev=1103635&r1=1103634&r2=1103635&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRule.java (original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/TestRule.java Mon May 16 07:37:24 2011
@@ -21,6 +21,7 @@ package org.apache.commons.digester3;
 import java.util.List;
 
 import org.apache.commons.digester3.Rule;
+import org.apache.commons.digester3.binder.RuleProvider;
 import org.xml.sax.Attributes;
 
 /**
@@ -159,4 +160,31 @@ public class TestRule
         return identifier;
     }
 
+    public static class TestRuleProvider implements RuleProvider<TestRule>
+    {
+
+        private final String identifier;
+
+        private final List<Rule> callOrder;
+
+        public TestRuleProvider( String identifier )
+        {
+            this( identifier, null );
+        }
+
+        public TestRuleProvider( String identifier, List<Rule> callOrder )
+        {
+            this.identifier = identifier;
+            this.callOrder = callOrder;
+        }
+
+        public TestRule get()
+        {
+            TestRule testRule = new TestRule( identifier );
+            testRule.setOrder( callOrder );
+            return testRule;
+        }
+
+    }
+
 }