Author: jleroux
Date: Wed Dec 31 10:01:56 2014
New Revision: 1648668

URL: http://svn.apache.org/r1648668
Log:
A slightly modified patch from Divesh Dutta for "The <delete> action in 
<entity-engine-xml> definitions throw an error in tests" 
https://issues.apache.org/jira/browse/OFBIZ-5906

Data loading for xml data was working fine when <delete>,<create>, 
<create-update> tag were used . But these tags were not working when data was 
loaded at the time of running J-unit tests. So after researched that how data 
loading was working fine for simple data load. So I used the same way than in 
EntityDataLoader.java to parse the XML file. 

jleroux: I simply removed the old code Divesh commented out in his patch

Modified:
    
ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/EntityXmlAssertTest.java

Modified: 
ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/EntityXmlAssertTest.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/EntityXmlAssertTest.java?rev=1648668&r1=1648667&r2=1648668&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/EntityXmlAssertTest.java
 (original)
+++ 
ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/EntityXmlAssertTest.java
 Wed Dec 31 10:01:56 2014
@@ -58,8 +58,8 @@ public class EntityXmlAssertTest extends
         int testCaseCount = 0;
         try {
             URL entityXmlURL = 
FlexibleLocation.resolveLocation(entityXmlUrlString);
-            List<GenericValue> checkValueList = 
delegator.readXmlDocument(entityXmlURL);
-            testCaseCount = checkValueList.size();
+            EntitySaxReader reader = new EntitySaxReader(delegator);
+            testCaseCount += reader.parse(entityXmlURL);
         } catch (Exception e) {
             Debug.logError(e, "Error getting test case count", module);
         }


Reply via email to