ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r905247 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml
Date Mon, 01 Feb 2010 10:55:55 GMT
Author: mor
Date: Mon Feb  1 10:55:55 2010
New Revision: 905247

URL: http://svn.apache.org/viewvc?rev=905247&view=rev
Log:
A test case for service createPerson.

Modified:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml

Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml?rev=905247&r1=905246&r2=905247&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml Mon Feb  1 10:55:55
2010
@@ -507,4 +507,24 @@
         <assert><if-compare field="pcmp.contactMechPurposeTypeId" operator="equals"
value="PRIMARY_PHONE"/></assert>
         <check-errors/>
     </simple-method>
+
+    <simple-method method-name="testCreatePerson" short-description="Test case for service
createPerson" login-required="false">
+        <set field="firstName" value="Demo"/>
+        <set field="lastName" value="Person"/>
+        <set field="serviceCtx.firstName" from-field="firstName"/>
+        <set field="serviceCtx.lastName" from-field="lastName"/>
+        <call-service service-name="createPerson" in-map-name="serviceCtx">
+            <result-to-field result-name="partyId"/>
+        </call-service>
+        <entity-one entity-name="Party" value-field="party"/>
+        <entity-one entity-name="Person" value-field="person"/>
+        <assert>
+            <not><if-empty field="party"></if-empty></not>
+            <if-compare field="party.partyTypeId" operator="equals" value="PERSON"/>
+            <not><if-empty field="person"></if-empty></not>
+            <if-compare-field field="person.firstName" operator="equals" to-field="firstName"/>
+            <if-compare-field field="person.lastName" operator="equals" to-field="lastName"/>
+        </assert>
+        <check-errors/>
+    </simple-method>
 </simple-methods>



Mime
View raw message