commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1067650 - /commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/XMLSchemaTestCase.java
Date Sun, 06 Feb 2011 12:32:18 GMT
Author: simonetripodi
Date: Sun Feb  6 12:32:18 2011
New Revision: 1067650

URL: http://svn.apache.org/viewvc?rev=1067650&view=rev
Log:
XMLSchemaTestCase uses the shared EmployeeModule

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

Modified: commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/XMLSchemaTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/XMLSchemaTestCase.java?rev=1067650&r1=1067649&r2=1067650&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/XMLSchemaTestCase.java
(original)
+++ commons/sandbox/digester3/trunk/src/test/java/org/apache/commons/digester3/XMLSchemaTestCase.java
Sun Feb  6 12:32:18 2011
@@ -55,27 +55,10 @@ public class XMLSchemaTestCase extends A
             newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).
             newSchema(this.getClass().getResource("Test13.xsd"));
 
-        digester = newLoader(new AbstractRulesModule() {
-
-            @Override
-            protected void configure() {
-                forPattern("employee").createObject().ofType(Employee.class);
-                forPattern("employee/firstName").setBeanProperty();
-                forPattern("employee/lastName").setBeanProperty();
-
-                forPattern("employee/address")
-                    .createObject().ofType(Address.class)
-                    .then()
-                    .setNext("addAddress");
-                forPattern("employee/address/type").setBeanProperty();
-                forPattern("employee/address/city").setBeanProperty();
-                forPattern("employee/address/state").setBeanProperty();
-            }
-
-        })
-        .setNamespaceAware(true)
-        .setSchema(test13schema)
-        .newDigester();
+        digester = newLoader(new EmployeeModule())
+            .setNamespaceAware(true)
+            .setSchema(test13schema)
+            .newDigester();
     }
 
     /**



Mime
View raw message