Author: jacopoc
Date: Fri Mar 29 07:07:59 2013
New Revision: 1462421
URL: http://svn.apache.org/r1462421
Log:
Reorganized test data and unit tests to remove wrong dependencies from
accounting to assetmaint and from order to scrum; all tests are now successful
even when all specialpurpose components (*except* ecommerce) are disabled.
Added:
ofbiz/trunk/applications/accounting/data/DemoAssetMaintData.xml
(contents, props changed)
- copied, changed from r1461550,
ofbiz/trunk/specialpurpose/assetmaint/data/DemoAssetMaintData.xml
ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/
ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml
(with props)
ofbiz/trunk/specialpurpose/assetmaint/testdef/
ofbiz/trunk/specialpurpose/assetmaint/testdef/assetmainttests.xml (with
props)
Removed:
ofbiz/trunk/specialpurpose/assetmaint/data/DemoAssetMaintData.xml
Modified:
ofbiz/trunk/applications/accounting/ofbiz-component.xml
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml
ofbiz/trunk/applications/order/testdef/data/QuoteTestData.xml
ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml
Copied: ofbiz/trunk/applications/accounting/data/DemoAssetMaintData.xml (from
r1461550, ofbiz/trunk/specialpurpose/assetmaint/data/DemoAssetMaintData.xml)
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoAssetMaintData.xml?p2=ofbiz/trunk/applications/accounting/data/DemoAssetMaintData.xml&p1=ofbiz/trunk/specialpurpose/assetmaint/data/DemoAssetMaintData.xml&r1=1461550&r2=1462421&rev=1462421&view=diff
==============================================================================
(empty)
Propchange: ofbiz/trunk/applications/accounting/data/DemoAssetMaintData.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/applications/accounting/data/DemoAssetMaintData.xml
------------------------------------------------------------------------------
svn:keywords = Date Rev Author URL Id
Propchange: ofbiz/trunk/applications/accounting/data/DemoAssetMaintData.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: ofbiz/trunk/applications/accounting/ofbiz-component.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/ofbiz-component.xml?rev=1462421&r1=1462420&r2=1462421&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/ofbiz-component.xml (original)
+++ ofbiz/trunk/applications/accounting/ofbiz-component.xml Fri Mar 29 07:07:59
2013
@@ -51,8 +51,8 @@ under the License.
<entity-resource type="data" reader-name="demo" loader="main"
location="data/DemoTaxAuthority.xml"/>
<entity-resource type="data" reader-name="demo" loader="main"
location="data/DemoAcctgTransactionData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main"
location="data/DemoPaymentsInvoices.xml"/>
-
<entity-resource type="data" reader-name="demo" loader="main"
location="data/DemoAccountingUserData.xml"/>
+ <entity-resource type="data" reader-name="demo" loader="main"
location="data/DemoAssetMaintData.xml"/>
<!-- General Payment Service Definitions -->
<service-resource type="model" loader="main"
location="servicedef/services_agreement.xml"/>
Modified:
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=1462421&r1=1462420&r2=1462421&view=diff
==============================================================================
---
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml
(original)
+++
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/FixedAssetTests.xml
Fri Mar 29 07:07:59 2013
@@ -173,127 +173,4 @@ under the License.
</assert>
<check-errors/>
</simple-method>
-
- <simple-method
method-name="testCreateFixedAssetMaintUpdateWorkEffortWithProductMaint"
short-description="Test case for service createFixedAssetMaintUpdateWorkEffort
with a product Maintenance" login-required="false">
- <set field="fixedAssetId" value="DEMO_VEHICLE_01"/>
- <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/>
- <set field="serviceCtx.statusId" value="FAM_CREATED"/>
- <set field="serviceCtx.productMaintSeqId" value="seq03"/><!-- Product
Maintenance -->
- <set field="serviceCtx.intervalMeterTypeId" value="ODOMETER"/>
- <set field="serviceCtx.estimatedStartDate" value="2009-12-18
00:00:00.000" type="Timestamp"/>
- <set field="serviceCtx.estimatedCompletionDate" value="2009-12-18
01:00:00.000" type="Timestamp"/>
- <set field="serviceCtx.actualStartDate" value="2009-12-20
00:00:00.000" 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="createFixedAssetMaintUpdateWorkEffort"
in-map-name="serviceCtx">
- <result-to-field result-name="maintHistSeqId"/>
- </call-service>
-
- <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint"/>
- <get-related-one relation-name="ScheduleWorkEffort"
value-field="fixedAssetMaint" to-value-field="workEffort"/>
- <assert>
- <not><if-empty field="fixedAssetMaint"/></not>
- <not><if-empty field="fixedAssetMaint.scheduleWorkEffortId"/></not>
- <not><if-empty field="workEffort"/></not>
- <if-compare-field field="workEffort.estimatedStartDate"
operator="equals" to-field="serviceCtx.estimatedStartDate"/>
- <if-compare-field field="workEffort.estimatedCompletionDate"
operator="equals" to-field="serviceCtx.estimatedCompletionDate"/>
- <if-compare-field field="workEffort.actualStartDate"
operator="equals" to-field="serviceCtx.actualStartDate"/>
- </assert>
- <check-errors/>
- </simple-method>
-
- <simple-method
method-name="testCreateFixedAssetMaintUpdateWorkEffortWithoutProductMaint"
short-description="Test case for service createFixedAssetMaintUpdateWorkEffort
without a product maintenance" login-required="false">
- <set field="fixedAssetId" value="DEMO_VEHICLE_01"/>
- <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/>
- <set field="serviceCtx.statusId" value="FAM_CREATED"/>
- <set field="serviceCtx.productMaintTypeId" value="OIL_CHANGE"/>
- <set field="serviceCtx.intervalMeterTypeId" value="ODOMETER"/>
- <set field="serviceCtx.estimatedStartDate" value="2009-12-18
00:00:00.000" type="Timestamp"/>
- <set field="serviceCtx.estimatedCompletionDate" value="2009-12-18
01:00:00.000" type="Timestamp"/>
- <set field="serviceCtx.actualStartDate" value="2009-12-20
00:00:00.000" 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="createFixedAssetMaintUpdateWorkEffort"
in-map-name="serviceCtx">
- <result-to-field result-name="maintHistSeqId"/>
- </call-service>
-
- <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint">
- <field-map field-name="fixedAssetId"/>
- <field-map field-name="maintHistSeqId"/>
- </entity-one>
- <get-related-one relation-name="ScheduleWorkEffort"
value-field="fixedAssetMaint" to-value-field="workEffort"/>
- <assert>
- <not><if-empty field="fixedAssetMaint"/></not>
- <not><if-empty field="fixedAssetMaint.scheduleWorkEffortId"/></not>
- <not><if-empty field="workEffort"/></not>
- <if-compare-field field="workEffort.estimatedStartDate"
operator="equals" to-field="serviceCtx.estimatedStartDate"/>
- <if-compare-field field="workEffort.estimatedCompletionDate"
operator="equals" to-field="serviceCtx.estimatedCompletionDate"/>
- <if-compare-field field="workEffort.actualStartDate"
operator="equals" to-field="serviceCtx.actualStartDate"/>
- </assert>
- <check-errors/>
- </simple-method>
-
- <simple-method method-name="testUpdateFixedAssetMaintAndWorkEffort"
short-description="Test case for service updateFixedAssetMaintAndWorkEffort"
login-required="false">
- <set field="fixedAssetId" value="DEMO_VEHICLE_01"/>
- <set field="maintHistSeqId" value="00001"/><!-- Sequence created by
testCreateFixedAssetMaintUpdateWorkEffortWithProductMaint -->
- <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/>
- <set field="serviceCtx.maintHistSeqId" from-field="maintHistSeqId"/>
- <set field="serviceCtx.estimatedCompletionDate" value="2009-12-22
01:00:00.000" type="Timestamp"/><!-- Changed estimatedCompletionDate to test
update service -->
- <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint"/>
- <set field="serviceCtx.workEffortId"
from-field="fixedAssetMaint.scheduleWorkEffortId"/>
- <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="updateFixedAssetMaintAndWorkEffort"
in-map-name="serviceCtx"/>
- <clear-field field="fixedAssetMaint"/>
- <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint"/>
- <get-related-one relation-name="ScheduleWorkEffort"
value-field="fixedAssetMaint" to-value-field="workEffort"/>
- <assert>
- <not><if-empty field="fixedAssetMaint"/></not>
- <not><if-empty field="fixedAssetMaint.scheduleWorkEffortId"/></not>
- <not><if-empty field="workEffort"/></not>
- <if-compare-field field="workEffort.estimatedCompletionDate"
operator="equals" to-field="serviceCtx.estimatedCompletionDate"/>
- </assert>
- <check-errors/>
- </simple-method>
-
- <simple-method
method-name="testUpdateFixedAssetMaintAndWorkEffortComplete"
short-description="Test case for service updateFixedAssetMaintAndWorkEffort"
login-required="false">
- <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint">
- <field-map field-name="fixedAssetId" value="DEMO_VEHICLE_01"/>
- <field-map field-name="maintHistSeqId" value="00001"/>
- </entity-one>
- <set field="serviceInMap.fixedAssetId"
from-field="fixedAssetMaint.fixedAssetId"/>
- <set field="serviceInMap.maintHistSeqId"
from-field="fixedAssetMaint.maintHistSeqId"/>
- <set field="serviceInMap.scheduleWorkEffortId"
from-field="fixedAssetMaint.scheduleWorkEffortId"/>
- <set field="serviceInMap.statusId" value="FAM_COMPLETED"/>
- <now-timestamp field="nowTimestamp"/>
- <set field="serviceInMap.actualCompletionDate"
from-field="nowTimestamp"/>
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="system"/>
- </entity-one>
- <set field="serviceInMap.userLogin" from-field="userLogin"/>
- <call-service service-name="updateFixedAssetMaintAndWorkEffort"
in-map-name="serviceInMap"/>
-
- <entity-one entity-name="FixedAssetMaint"
value-field="newFixedAssetMaint">
- <field-map field-name="fixedAssetId" value="DEMO_VEHICLE_01"/>
- <field-map field-name="maintHistSeqId" value="00001"/>
- </entity-one>
- <assert>
- <if-compare field="newFixedAssetMaint.statusId" operator="equals"
value="FAM_COMPLETED"/>
- </assert>
- <check-errors/>
- <entity-one entity-name="WorkEffort" value-field="workEffort">
- <field-map field-name="workEffortId"
from-field="fixedAssetMaint.scheduleWorkEffortId"/>
- </entity-one>
- <assert>
- <if-compare field="workEffort.currentStatusId" operator="equals"
value="CAL_COMPLETED"/>
- <if-compare-field field="workEffort.actualCompletionDate"
operator="equals" to-field="nowTimestamp" type="Timestamp"/>
- </assert>
- <check-errors/>
- </simple-method>
</simple-methods>
Modified: ofbiz/trunk/applications/order/testdef/data/QuoteTestData.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/testdef/data/QuoteTestData.xml?rev=1462421&r1=1462420&r2=1462421&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/testdef/data/QuoteTestData.xml (original)
+++ ofbiz/trunk/applications/order/testdef/data/QuoteTestData.xml Fri Mar 29
07:07:59 2013
@@ -21,5 +21,5 @@ under the License.
<entity-engine-xml>
<Quote quoteId="9000" quoteTypeId="PRODUCT_QUOTE" partyId="DemoCustomer"
issueDate="2009-12-11 12:00:00.000" statusId="QUO_CREATED" currencyUomId="USD"
productStoreId="9000" salesChannelEnumId="EMAIL_SALES_CHANNEL"
validFromDate="2009-12-11 12:00:00.000" quoteName="Most competitive quote
ever"/>
<QuoteItem quoteId="9000" quoteItemSeqId="00001" productId="GZ-1001"/>
- <WorkEffort workEffortId="9007" workEffortTypeId="TASK"
currentStatusId="PTS_CREATED" workEffortName="Quote WorkEffort"/>
+ <WorkEffort workEffortId="9007" workEffortTypeId="TASK"
workEffortName="Quote WorkEffort"/>
</entity-engine-xml>
Modified: ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml?rev=1462421&r1=1462420&r2=1462421&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml Fri Mar 29
07:07:59 2013
@@ -35,12 +35,13 @@
<entity-resource type="data" reader-name="seed" loader="main"
location="data/AssetMaintSecurityPermissionSeedData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main"
location="data/AssetMaintSecurityGroupDemoData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main"
location="data/AssetMaintSeedData.xml"/>
- <entity-resource type="data" reader-name="demo" loader="main"
location="data/DemoAssetMaintData.xml"/>
<!-- service resources: model(s), eca(s) and group definitions -->
<service-resource type="model" loader="main"
location="servicedef/services.xml"/>
<service-resource type="eca" loader="main"
location="servicedef/secas.xml"/>
+ <test-suite loader="main" location="testdef/assetmainttests.xml"/>
+
<webapp name="assetmaint"
title="AssetMaint"
server="default-server"
Added:
ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml?rev=1462421&view=auto
==============================================================================
---
ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml
(added)
+++
ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml
Fri Mar 29 07:07:59 2013
@@ -0,0 +1,146 @@
+<?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-v2.xsd">
+
+ <simple-method
method-name="testCreateFixedAssetMaintUpdateWorkEffortWithProductMaint"
short-description="Test case for service createFixedAssetMaintUpdateWorkEffort
with a product Maintenance" login-required="false">
+ <set field="fixedAssetId" value="DEMO_VEHICLE_01"/>
+ <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/>
+ <set field="serviceCtx.statusId" value="FAM_CREATED"/>
+ <set field="serviceCtx.productMaintSeqId" value="seq03"/><!-- Product
Maintenance -->
+ <set field="serviceCtx.intervalMeterTypeId" value="ODOMETER"/>
+ <set field="serviceCtx.estimatedStartDate" value="2009-12-18
00:00:00.000" type="Timestamp"/>
+ <set field="serviceCtx.estimatedCompletionDate" value="2009-12-18
01:00:00.000" type="Timestamp"/>
+ <set field="serviceCtx.actualStartDate" value="2009-12-20
00:00:00.000" 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="createFixedAssetMaintUpdateWorkEffort"
in-map-name="serviceCtx">
+ <result-to-field result-name="maintHistSeqId"/>
+ </call-service>
+
+ <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint"/>
+ <get-related-one relation-name="ScheduleWorkEffort"
value-field="fixedAssetMaint" to-value-field="workEffort"/>
+ <assert>
+ <not><if-empty field="fixedAssetMaint"/></not>
+ <not><if-empty field="fixedAssetMaint.scheduleWorkEffortId"/></not>
+ <not><if-empty field="workEffort"/></not>
+ <if-compare-field field="workEffort.estimatedStartDate"
operator="equals" to-field="serviceCtx.estimatedStartDate"/>
+ <if-compare-field field="workEffort.estimatedCompletionDate"
operator="equals" to-field="serviceCtx.estimatedCompletionDate"/>
+ <if-compare-field field="workEffort.actualStartDate"
operator="equals" to-field="serviceCtx.actualStartDate"/>
+ </assert>
+ <check-errors/>
+ </simple-method>
+
+ <simple-method
method-name="testCreateFixedAssetMaintUpdateWorkEffortWithoutProductMaint"
short-description="Test case for service createFixedAssetMaintUpdateWorkEffort
without a product maintenance" login-required="false">
+ <set field="fixedAssetId" value="DEMO_VEHICLE_01"/>
+ <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/>
+ <set field="serviceCtx.statusId" value="FAM_CREATED"/>
+ <set field="serviceCtx.productMaintTypeId" value="OIL_CHANGE"/>
+ <set field="serviceCtx.intervalMeterTypeId" value="ODOMETER"/>
+ <set field="serviceCtx.estimatedStartDate" value="2009-12-18
00:00:00.000" type="Timestamp"/>
+ <set field="serviceCtx.estimatedCompletionDate" value="2009-12-18
01:00:00.000" type="Timestamp"/>
+ <set field="serviceCtx.actualStartDate" value="2009-12-20
00:00:00.000" 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="createFixedAssetMaintUpdateWorkEffort"
in-map-name="serviceCtx">
+ <result-to-field result-name="maintHistSeqId"/>
+ </call-service>
+
+ <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint">
+ <field-map field-name="fixedAssetId"/>
+ <field-map field-name="maintHistSeqId"/>
+ </entity-one>
+ <get-related-one relation-name="ScheduleWorkEffort"
value-field="fixedAssetMaint" to-value-field="workEffort"/>
+ <assert>
+ <not><if-empty field="fixedAssetMaint"/></not>
+ <not><if-empty field="fixedAssetMaint.scheduleWorkEffortId"/></not>
+ <not><if-empty field="workEffort"/></not>
+ <if-compare-field field="workEffort.estimatedStartDate"
operator="equals" to-field="serviceCtx.estimatedStartDate"/>
+ <if-compare-field field="workEffort.estimatedCompletionDate"
operator="equals" to-field="serviceCtx.estimatedCompletionDate"/>
+ <if-compare-field field="workEffort.actualStartDate"
operator="equals" to-field="serviceCtx.actualStartDate"/>
+ </assert>
+ <check-errors/>
+ </simple-method>
+
+ <simple-method method-name="testUpdateFixedAssetMaintAndWorkEffort"
short-description="Test case for service updateFixedAssetMaintAndWorkEffort"
login-required="false">
+ <set field="fixedAssetId" value="DEMO_VEHICLE_01"/>
+ <set field="maintHistSeqId" value="00001"/><!-- Sequence created by
testCreateFixedAssetMaintUpdateWorkEffortWithProductMaint -->
+ <set field="serviceCtx.fixedAssetId" from-field="fixedAssetId"/>
+ <set field="serviceCtx.maintHistSeqId" from-field="maintHistSeqId"/>
+ <set field="serviceCtx.estimatedCompletionDate" value="2009-12-22
01:00:00.000" type="Timestamp"/><!-- Changed estimatedCompletionDate to test
update service -->
+ <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint"/>
+ <set field="serviceCtx.workEffortId"
from-field="fixedAssetMaint.scheduleWorkEffortId"/>
+ <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="updateFixedAssetMaintAndWorkEffort"
in-map-name="serviceCtx"/>
+ <clear-field field="fixedAssetMaint"/>
+ <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint"/>
+ <get-related-one relation-name="ScheduleWorkEffort"
value-field="fixedAssetMaint" to-value-field="workEffort"/>
+ <assert>
+ <not><if-empty field="fixedAssetMaint"/></not>
+ <not><if-empty field="fixedAssetMaint.scheduleWorkEffortId"/></not>
+ <not><if-empty field="workEffort"/></not>
+ <if-compare-field field="workEffort.estimatedCompletionDate"
operator="equals" to-field="serviceCtx.estimatedCompletionDate"/>
+ </assert>
+ <check-errors/>
+ </simple-method>
+
+ <simple-method
method-name="testUpdateFixedAssetMaintAndWorkEffortComplete"
short-description="Test case for service updateFixedAssetMaintAndWorkEffort"
login-required="false">
+ <entity-one entity-name="FixedAssetMaint"
value-field="fixedAssetMaint">
+ <field-map field-name="fixedAssetId" value="DEMO_VEHICLE_01"/>
+ <field-map field-name="maintHistSeqId" value="00001"/>
+ </entity-one>
+ <set field="serviceInMap.fixedAssetId"
from-field="fixedAssetMaint.fixedAssetId"/>
+ <set field="serviceInMap.maintHistSeqId"
from-field="fixedAssetMaint.maintHistSeqId"/>
+ <set field="serviceInMap.scheduleWorkEffortId"
from-field="fixedAssetMaint.scheduleWorkEffortId"/>
+ <set field="serviceInMap.statusId" value="FAM_COMPLETED"/>
+ <now-timestamp field="nowTimestamp"/>
+ <set field="serviceInMap.actualCompletionDate"
from-field="nowTimestamp"/>
+ <entity-one entity-name="UserLogin" value-field="userLogin">
+ <field-map field-name="userLoginId" value="system"/>
+ </entity-one>
+ <set field="serviceInMap.userLogin" from-field="userLogin"/>
+ <call-service service-name="updateFixedAssetMaintAndWorkEffort"
in-map-name="serviceInMap"/>
+
+ <entity-one entity-name="FixedAssetMaint"
value-field="newFixedAssetMaint">
+ <field-map field-name="fixedAssetId" value="DEMO_VEHICLE_01"/>
+ <field-map field-name="maintHistSeqId" value="00001"/>
+ </entity-one>
+ <assert>
+ <if-compare field="newFixedAssetMaint.statusId" operator="equals"
value="FAM_COMPLETED"/>
+ </assert>
+ <check-errors/>
+ <entity-one entity-name="WorkEffort" value-field="workEffort">
+ <field-map field-name="workEffortId"
from-field="fixedAssetMaint.scheduleWorkEffortId"/>
+ </entity-one>
+ <assert>
+ <if-compare field="workEffort.currentStatusId" operator="equals"
value="CAL_COMPLETED"/>
+ <if-compare-field field="workEffort.actualCompletionDate"
operator="equals" to-field="nowTimestamp" type="Timestamp"/>
+ </assert>
+ <check-errors/>
+ </simple-method>
+</simple-methods>
Propchange:
ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml
------------------------------------------------------------------------------
svn:keywords = Date Rev Author URL Id
Propchange:
ofbiz/trunk/specialpurpose/assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ofbiz/trunk/specialpurpose/assetmaint/testdef/assetmainttests.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/testdef/assetmainttests.xml?rev=1462421&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/testdef/assetmainttests.xml (added)
+++ ofbiz/trunk/specialpurpose/assetmaint/testdef/assetmainttests.xml Fri Mar
29 07:07:59 2013
@@ -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="assetmainttests"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
+
+ <test-case case-name="assetmaint-tests">
+ <simple-method-test
location="component://assetmaint/script/org/ofbiz/assetmaint/test/FixedAssetMaintTests.xml"/>
+ </test-case>
+
+</test-suite>
Propchange: ofbiz/trunk/specialpurpose/assetmaint/testdef/assetmainttests.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/specialpurpose/assetmaint/testdef/assetmainttests.xml
------------------------------------------------------------------------------
svn:keywords = Date Rev Author URL Id
Propchange: ofbiz/trunk/specialpurpose/assetmaint/testdef/assetmainttests.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml