|
Author: mor
Date: Tue Dec 29 12:34:40 2009 New Revision: 894369 URL: http://svn.apache.org/viewvc?rev=894369&view=rev Log: Test case for create/update/delete FixedAssetRegistration. Added: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml (with props) ofbiz/trunk/applications/accounting/testdef/fixedassettests.xml (with props) Modified: ofbiz/trunk/applications/accounting/ofbiz-component.xml Modified: ofbiz/trunk/applications/accounting/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/ofbiz-component.xml?rev=894369&r1=894368&r2=894369&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/ofbiz-component.xml (original) +++ ofbiz/trunk/applications/accounting/ofbiz-component.xml Tue Dec 29 12:34:40 2009 @@ -92,6 +92,7 @@ <test-suite loader="main" location="testdef/accountingtests.xml"/> <test-suite loader="main" location="testdef/paymenttests.xml"/> <test-suite loader="main" location="testdef/invoicetests.xml"/> + <test-suite loader="main" location="testdef/fixedassettests.xml"/> <webapp name="accounting" title="Accounting" Added: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml?rev=894369&view=auto ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml (added) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml Tue Dec 29 12:34:40 2009 @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> + + <simple-method method-name="testCreateFixedAssetRegistration" short-description="Test case for service createFixedAssetRegistration" login-required="false"> + <set field="serviceCtx.fixedAssetId" value="DEMO_VEHICLE_01"/> + <set field="serviceCtx.licenseNumber" value="123456"/> + <set field="serviceCtx.registrationNumber" value="123456"/> + <set field="serviceCtx.registrationDate" value="2009-12-24 12:33:23.703" type="Timestamp"/> + <set field="serviceCtx.fromDate" value="2009-12-24 12:33:08.247" type="Timestamp"/> + <set field="serviceCtx.thruDate" value="2010-12-25 12:33:18.365" type="Timestamp"/> + <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="createFixedAssetRegistration" in-map-name="serviceCtx"/> + + <entity-one entity-name="FixedAssetRegistration" value-field="fixedAssetRegistration"> + <field-map field-name="fixedAssetId" from-field="serviceCtx.fixedAssetId"/> + <field-map field-name="fromDate" from-field="serviceCtx.fromDate"/> + </entity-one> + <assert> + <not><if-empty field="fixedAssetRegistration"/></not> + </assert> + <check-errors/> + </simple-method> + + <simple-method method-name="testUpdateFixedAssetRegistration" short-description="Test case for service updateFixedAssetRegistration" login-required="false"> + <set field="fixedAssetId" value="DEMO_VEHICLE_01"/> + <set field="registrationDate" value="2010-12-24 12:33:23.703" type="Timestamp"/> + <set field="fromDate" value="2009-12-24 12:33:08.247" type="Timestamp"/> + <set field="thruDate" value="2033-12-25 12:33:18.365" type="Timestamp"/> + <entity-one entity-name="UserLogin" value-field="userLogin"> + <field-map field-name="userLoginId" value="system"/> + </entity-one> + <set field="serviceCtx.userLogin" from-field="userLogin"/> + <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/> + <set field="serviceCtx.registrationDate" from-field="registrationDate"/> + <set field="serviceCtx.fromDate" from-field="fromDate"/> + <set field="serviceCtx.thruDate" from-field="thruDate"/> + <call-service service-name="updateFixedAssetRegistration" in-map-name="serviceCtx"/> + + <entity-one entity-name="FixedAssetRegistration" value-field="fixedAssetRegistration"/> + <assert> + <if-compare-field field="fixedAssetRegistration.thruDate" operator="equals" to-field="thruDate"/> + <if-compare-field field="fixedAssetRegistration.registrationDate" operator="equals" to-field="registrationDate"/> + </assert> + <check-errors/> + </simple-method> + + <simple-method method-name="testDeleteFixedAssetRegistration" short-description="Test case for service deleteFixedAssetRegistration" login-required="false"> + <set field="fixedAssetId" value="DEMO_VEHICLE_01"/> + <set field="fromDate" value="2009-12-24 12:33:08.247" type="Timestamp"/> + <entity-one entity-name="UserLogin" value-field="userLogin"> + <field-map field-name="userLoginId" value="system"/> + </entity-one> + <set field="serviceCtx.userLogin" from-field="userLogin"/> + <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/> + <set field="serviceCtx.fromDate" from-field="fromDate"/> + <call-service service-name="deleteFixedAssetRegistration" in-map-name="serviceCtx"/> + + <entity-one entity-name="FixedAssetRegistration" value-field="fixedAssetRegistration"/> + <assert> + <if-empty field="fixedAssetRegistration"/> + </assert> + <check-errors/> + </simple-method> +</simple-methods> \ No newline at end of file Propchange: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: ofbiz/trunk/applications/accounting/testdef/fixedassettests.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/testdef/fixedassettests.xml?rev=894369&view=auto ============================================================================== --- ofbiz/trunk/applications/accounting/testdef/fixedassettests.xml (added) +++ ofbiz/trunk/applications/accounting/testdef/fixedassettests.xml Tue Dec 29 12:34:40 2009 @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + +<test-suite suite-name="fixedassettests" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd"> + + <test-case case-name="fixedasset-tests"> + <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml"/> + </test-case> + +</test-suite> \ No newline at end of file Propchange: ofbiz/trunk/applications/accounting/testdef/fixedassettests.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/accounting/testdef/fixedassettests.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/accounting/testdef/fixedassettests.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml |
| Free forum by Nabble | Edit this page |
