Author: mor
Date: Mon Feb 1 10:55:55 2010
New Revision: 905247
URL:
http://svn.apache.org/viewvc?rev=905247&view=revLog:
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>