You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2010/02/02 15:51:15 UTC
svn commit: r905655 -
/ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml
Author: mor
Date: Tue Feb 2 14:51:14 2010
New Revision: 905655
URL: http://svn.apache.org/viewvc?rev=905655&view=rev
Log:
Added a test case for createUpdatePerson service for testing create operation of the service.
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=905655&r1=905654&r2=905655&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 Tue Feb 2 14:51:14 2010
@@ -611,4 +611,25 @@
</assert>
<check-errors/>
</simple-method>
+
+ <simple-method method-name="testCreateUpdatePersonWithCreate" short-description="Test the service to create a person" login-required="false">
+ <set field="serviceCtx.partyId" value="DemoPerson1"/>
+ <set field="serviceCtx.firstName" value="Demo"/>
+ <set field="serviceCtx.lastName" value="Person1"/>
+ <entity-one entity-name="UserLogin" value-field="userLogin">
+ <field-map field-name="userLoginId" value="system"/>
+ </entity-one>
+ <set field="serviceCtx.userLogin" from-field="userLogin"/>
+ <call-service service-name="createUpdatePerson" 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"/></not>
+ <if-compare field="person.firstName" operator="equals" value="Demo"/>
+ <if-compare field="person.lastName" operator="equals" value="Person1"/>
+ </assert>
+ <check-errors/>
+ </simple-method>
</simple-methods>
\ No newline at end of file