This is an automated email from the ASF dual-hosted git repository.
ashishvijaywargiya pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git
The following commit(s) were added to refs/heads/trunk by this push:
new 276c12a54 Test cases migration xml to groovy in scrum component of
plugins folder (#264)
276c12a54 is described below
commit 276c12a542777c7902bc04418ff7856a8d4c093e
Author: Ashish Vijaywargiya <[email protected]>
AuthorDate: Sun May 31 11:58:15 2026 +0530
Test cases migration xml to groovy in scrum component of plugins folder
(#264)
Moved the xml test cases to groovy ones in scrum component of plugins
folder.
---
scrum/data/scrumDemoData.xml | 3 +
scrum/minilang/test/DailyMeetingMinuteTests.xml | 39 ---
scrum/minilang/test/MyWorkTests.xml | 95 -------
scrum/minilang/test/ProductBacklogTest.xml | 263 --------------------
scrum/minilang/test/ProductTest.xml | 86 -------
scrum/minilang/test/QATests.xml | 42 ----
scrum/minilang/test/ScrumProjectTests.xml | 80 ------
scrum/minilang/test/ScrumTests.xml | 31 ---
scrum/minilang/test/SprintBacklogTests.xml | 64 -----
scrum/minilang/test/SprintTests.xml | 117 ---------
scrum/minilang/test/TaskTests.xml | 98 --------
scrum/minilang/test/TimesheetTests.xml | 33 ---
.../scrum/test/DailyMeetingMinuteTests.groovy | 44 ++++
.../org/apache/ofbiz/scrum/test/MyWorkTests.groovy | 119 +++++++++
.../ofbiz/scrum/test/ProductBacklogTests.groovy | 273 +++++++++++++++++++++
.../apache/ofbiz/scrum/test/ProductTests.groovy | 114 +++++++++
.../ofbiz/scrum/test/ScrumProjectTests.groovy | 99 ++++++++
.../org/apache/ofbiz/scrum/test/ScrumTests.groovy | 39 +++
.../ofbiz/scrum/test/SprintBacklogTests.groovy | 79 ++++++
.../org/apache/ofbiz/scrum/test/SprintTests.groovy | 140 +++++++++++
.../org/apache/ofbiz/scrum/test/TaskTests.groovy | 43 ++++
.../apache/ofbiz/scrum/test/TimesheetTests.groovy | 41 ++++
scrum/testdef/scrumTests.xml | 65 +++--
23 files changed, 1025 insertions(+), 982 deletions(-)
diff --git a/scrum/data/scrumDemoData.xml b/scrum/data/scrumDemoData.xml
index 8efff9fe4..65274c1d3 100644
--- a/scrum/data/scrumDemoData.xml
+++ b/scrum/data/scrumDemoData.xml
@@ -266,6 +266,9 @@ under the License.
<Timesheet timesheetId="DEMO-TIMESHEET2" partyId="SCRUMTEAM-1"
fromDate="2010-10-25 00:00:00.000" thruDate="2010-10-31 23:59:59.000"
statusId="TIMESHEET_IN_PROCESS" />
<Timesheet timesheetId="DEMO-TIMESHEET3" partyId="SCRUMTEAM-1"
fromDate="2010-10-18 00:00:00.000" thruDate="2010-10-24 23:59:59.000"
statusId="TIMESHEET_COMPLETED" />
+ <!-- Rate Amounts -->
+ <RateAmount rateTypeId="STANDARD" rateCurrencyUomId="USD"
periodTypeId="RATE_HOUR" workEffortId="_NA_" partyId="SCRUMTEAM-1"
emplPositionTypeId="_NA_" fromDate="2010-01-01 00:00:00.000"
rateAmount="100.0"/>
+
<!-- Time Entry -->
<TimeEntry timeEntryId="DEMO-TIMEENTRY1" partyId="SCRUMTEAM-1"
fromDate="2010-10-19 00:00:00.000" rateTypeId="STANDARD"
workEffortId="DEMO-TASK-3" timesheetId="DEMO-TIMESHEET3" hours="8"
planHours="8"/>
<TimeEntry timeEntryId="DEMO-TIMEENTRY2" partyId="SCRUMTEAM-1"
fromDate="2010-10-20 00:00:00.000" rateTypeId="STANDARD"
workEffortId="DEMO-TASK-4" timesheetId="DEMO-TIMESHEET3" hours="8"
planHours="8"/>
diff --git a/scrum/minilang/test/DailyMeetingMinuteTests.xml
b/scrum/minilang/test/DailyMeetingMinuteTests.xml
deleted file mode 100644
index b7073f1de..000000000
--- a/scrum/minilang/test/DailyMeetingMinuteTests.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
- <simple-method method-name="testDailyMinute" short-description="Daily
Meeting Minute Test" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.workEffortId" value="TEST_WE_006"/>
- <set field="noteData.noteId" value="NOTE-1"/>
- <set field="noteData.noteName" value="NOTE-1-Name"/>
- <set field="noteData.noteInfo" value="NoteInfo"/>
- <set field="noteData.noteParty" from-field="userLogin"/>
- <set field="noteData.partyId" value="admin"/>
- <set field="noteData.noteDateTime" value="2010-10-13"
type="Timestamp"/>
- <call-simple-method method-name="createDailyNote"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-</simple-methods>
diff --git a/scrum/minilang/test/MyWorkTests.xml
b/scrum/minilang/test/MyWorkTests.xml
deleted file mode 100644
index b1b9e27d0..000000000
--- a/scrum/minilang/test/MyWorkTests.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
- <simple-method
method-name="testUpdateTimesheetEntryByWorkeffortNotComplete"
short-description="Test update timesheet entry by workeffort"
login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrumteam1"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="inMap.timesheetId" value="DEMO-TIMESHEET1" />
- <set field="inMap.workEffortId" value="DEMO-TASK-1"/>
- <set field="inMap.planHours_o_0" value="2.0" type="Double"/>
- <set field="inMap.hoursDay0_o_0" value="1.0" type="Double"/>
- <set field="inMap.checkComplete" value="N"/>
- <call-service service-name="updateTimesheetEntryByWorkeffort"
in-map-name="inMap"></call-service>
- </simple-method>
-
- <simple-method method-name="testUpdateTimesheetEntryByWorkeffortComplete"
short-description="Test update timesheet entry by workeffort"
login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrumteam1"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="inMap.timesheetId" value="DEMO-TIMESHEET1" />
- <set field="inMap.workEffortId" value="DEMO-TASK-1"/>
- <set field="inMap.planHours_o_0" value="2.0" type="Double"/>
- <set field="inMap.hoursDay0_o_0" value="1.0" type="Double"/>
- <set field="inMap.checkComplete" value="Y"/>
- <call-service service-name="updateTimesheetEntryByWorkeffort"
in-map-name="inMap"></call-service>
- </simple-method>
- <simple-method method-name="testUpdateTask" short-description="Test update
tasks" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrumteam2"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.planHours" value="1.0" type="Double"/>
- <set field="parameters.workEffortId" value="DEMO-SPRINT-1"/>
- <set field="parameters.taskId" value="DEMO-TASK-2"/>
- <set field="parameters.partyId" value="SCRUMTEAM-2"/>
- <call-simple-method method-name="updateTask"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testRemoveTaskAssignToMe"
short-description="Test remove task assign to me" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrumteam2"/>
- </entity-one>
- <entity-and entity-name="WorkEffortPartyAssignment"
list="listWorkAssignment">
- <field-map field-name="workEffortId" value="DEMO-TASK-2" />
- <field-map field-name="partyId" value="SCRUMTEAM-2"/>
- </entity-and>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.workEffortId" value="DEMO-TASK-2"/>
- <set field="parameters.partyId" value="SCRUMTEAM-2"/>
- <set field="parameters.roleTypeId"
from-field="listWorkAssignment[0].roleTypeId"/>
- <set field="parameters.fromDate"
from-field="listWorkAssignment[0].fromDate"/>
- <call-service service-name="unassignPartyFromWorkEffort"
in-map-name="parameters"></call-service>
- </simple-method>
-
- <simple-method method-name="testAddNewTimesheet" short-description="Test
add a new timesheet" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrumteam2"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="inMap.partyId" value="SCRUMTEAM-2"/>
- <set field="inMap.requiredDate" value="2010-08-23 11:44:08.418"
type="Timestamp"/>
- <call-service service-name="createTimesheetForThisWeek"
in-map-name="inMap" >
- </call-service>
- </simple-method>
- <simple-method method-name="testSetTimeSheetStatusToComplete"
short-description="Test set timesheet status to complete"
login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrumteam2"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="inMap.timesheetId" value="DEMO-TIMESHEET2"/>
- <set field="inMap.statusId" value="TIMESHEET_COMPLETED"/>
- <call-service service-name="updateTimesheet" in-map-name="inMap"/>
- </simple-method>
-</simple-methods>
diff --git a/scrum/minilang/test/ProductBacklogTest.xml
b/scrum/minilang/test/ProductBacklogTest.xml
deleted file mode 100644
index c549df805..000000000
--- a/scrum/minilang/test/ProductBacklogTest.xml
+++ /dev/null
@@ -1,263 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
- <simple-method method-name="testCreateProductBacklogByAdmin"
short-description="Test Create Product Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.custRequestName" value="TEST Product Backlog"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.description" value="TEST Product Backlog"/>
- <call-simple-method method-name="createProductBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testCreateProductBacklogByProductOwner"
short-description="Test Create Product Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="productowner"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.custRequestName" value="TEST Product Backlog"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.description" value="TEST Product Backlog"/>
- <call-simple-method method-name="createProductBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testCreateProductBacklogByScrumMaster"
short-description="Test Create Product Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrummaster"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.custRequestName" value="TEST Product Backlog"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.description" value="TEST Product Backlog"/>
- <call-simple-method method-name="createProductBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testUpdateProductBacklogByAdmin"
short-description="Test Update Product Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.custRequestId" value="TEST5"/>
- <set field="parameters.custRequestName" value="TEST Product Backlog"/>
- <set field="parameters.noteInfo" value="TestNote"/>
- <set field="parameters.description" value="TEST Product Backlog"/>
- <call-simple-method method-name="updateProductBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testUpdateProductBacklogByProductOwner"
short-description="Test Update Product Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="productowner"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.custRequestId" value="TEST6"/>
- <set field="parameters.custRequestName" value="TEST Product Backlog"/>
- <set field="parameters.description" value="TEST Product Backlog"/>
- <set field="parameters.noteData" value="note"/>
- <set field="parameters.note" value="note1"/>
- <set field="parameters.noteId" value="NOTE-1"/>
- <set field="parameters.noteInfo" value="TestNote"/>
- <set field="parameters.valueAcsr" value=""/>
- <call-simple-method method-name="updateProductBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testDeleteProductBacklogByAdmin"
short-description="Test Delete Product Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.custRequestId" value="TEST5"/>
- <entity-one entity-name="CustRequest" value-field="result">
- <field-map field-name="custRequestId"
from-field="parameters.custRequestId"/>
- </entity-one>
- <if-compare operator="equals" value="CRQ_ACCEPTED"
field="result.statusId">
- <call-simple-method method-name="deleteCustRequest"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </if-compare>
- </simple-method>
-
- <simple-method method-name="testDeleteProductBacklogByProducOwner"
short-description="Test Delete Product Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="productowner"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.custRequestId" value="TEST6"/>
- <entity-one entity-name="CustRequest" value-field="result">
- <field-map field-name="custRequestId"
from-field="parameters.custRequestId"/>
- </entity-one>
- <if-compare operator="equals" value="CRQ_ACCEPTED"
field="result.statusId">
- <call-simple-method method-name="deleteCustRequest"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </if-compare>
- </simple-method>
-
- <simple-method method-name="testDeleteProductBacklogByScrumMaster"
short-description="Test Delete Product Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrummaster"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.custRequestId" value="TEST7"/>
- <call-simple-method method-name="deleteCustRequest"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testCreateBacklogSetStatus"
short-description=" Test Set Status Create Product Backlog"
login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="productowner"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.custRequestName" value="TEST Product Backlog"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.description" value ="TEST Product Backlog"/>
- <call-simple-method method-name="createProductBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testCreateDefaultBacklogs"
short-description="Test Create DefaultBacklogs" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <entity-one entity-name="WorkEffort" value-field="workEffort">
- <field-map field-name="workEffortId" value="DEMO-PROJECT-1"/>
- </entity-one>
- <set field="parameters.workEffortName" value="Test Default Task"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.description"
from-field="workEffort.description"/>
- <set field="parameters.workEffortTypeId" value="SCRUM_TASK_IMPL"/>
- <set field="parameters.workEffortPurposeTypeId"
value="SCRUM_DEFAULT_TASK"/>
- <set field="parameters.currentStatusId" value="STS_CREATED"/>
- <call-simple-method method-name="createDefaultTask"
xml-resource="component://scrum/minilang/ScrumEvents.xml" />
- </simple-method>
-
- <simple-method method-name="testCreateProductBacklogCategory"
short-description="Test Create Product Backlog Category" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.custRequestId" value="TEST11"/>
- <set field="parameters.custRequestName" value="Backlog"/>
- <call-simple-method method-name="createProductBacklogCategory"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testUpdateProductBacklogCategory"
short-description="Test Update Product Backlog Category" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.custRequestId" value="TEST10"/>
- <set field="parameters.custRequestName" value="Backlog"/>
- <call-simple-method method-name="updateProductBacklogCategory"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testNewProductBacklogEmail"
short-description="Test New Product Backlog Email" login-required="false">
- <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.productId" value="DEMO-PRODUCT-1"/>
- <set field="serviceCtx.custRequestId" value="TEST10"/>
- <set field="serviceCtx.communicationEventTypeId"
value="EMAIL_COMMUNICATION" />
- <set field="serviceCtx.partyIdFrom" value="DemoCustomer-1"/>
- <set field="serviceCtx.partyIdTo" value="SCRUMASTER"/>
- <set field="serviceCtx.subject" value="Test New Product Backlog
Email"/>
- <call-service service-name="createCommunicationEvent"
in-map-name="serviceCtx"/>
- </simple-method>
-
- <simple-method method-name="testUpdateProductBacklogEmail"
short-description="Test Update Product Backlog Email" login-required="false">
- <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.communicationEventId"
value="DEMO-COM-PRODUCT-1"/>
- <set field="serviceCtx.productId" value="DEMO-PRODUCT-1"/>
- <set field="serviceCtx.custRequestId" value="TEST10"/>
- <set field="serviceCtx.communicationEventTypeId"
value="EMAIL_COMMUNICATION" />
- <set field="serviceCtx.subject" value="Test New Product Backlog
Email"/>
- <call-service service-name="updateCommunicationEvent"
in-map-name="serviceCtx"/>
- </simple-method>
-
- <simple-method method-name="testUpdateSprintBacklogseqDown"
short-description="Test Update Sprint Backlog Sequence on Down"
login-required="false">
- <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.mode" value="DWN"/>
- <set field="serviceCtx.custRequestId" value="TEST9"/>
- <set field="serviceCtx.productId" value="DEMO-PRODUCT-1"/>
- <set field="serviceCtx.custRequestItemSeqId" value="TESTSEQ9"/>
- <set field="serviceCtx.statusId" value="CRQ_ACCEPTED"/>
- <set field="serviceCtx.searchOption_statusId" value="CRQ_ACCEPTED"/>
- <call-service service-name="updateSprintBacklogseq"
in-map-name="serviceCtx"/>
- </simple-method>
- <simple-method method-name="testUpdateSprintBacklogseqUP"
short-description="Test Update Sprint Backlog Sequence on UP"
login-required="false">
- <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.mode" value="UP"/>
- <set field="serviceCtx.custRequestId" value="TEST9"/>
- <set field="serviceCtx.productId" value="DEMO-PRODUCT-1"/>
- <set field="serviceCtx.custRequestItemSeqId" value="TESTSEQ9"/>
- <set field="serviceCtx.statusId" value="CRQ_ACCEPTED"/>
- <set field="serviceCtx.searchOption_statusId" value="CRQ_ACCEPTED"/>
- <call-service service-name="updateSprintBacklogseq"
in-map-name="serviceCtx"/>
- </simple-method>
- <simple-method method-name="testUpdateSprintBacklogseqBotton"
short-description="Test Update Sprint Backlog Sequence on Botton"
login-required="false">
- <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.mode" value="BOT"/>
- <set field="serviceCtx.custRequestId" value="TEST9"/>
- <set field="serviceCtx.productId" value="DEMO-PRODUCT-1"/>
- <set field="serviceCtx.custRequestItemSeqId" value="TESTSEQ9"/>
- <set field="serviceCtx.statusId" value="CRQ_ACCEPTED"/>
- <set field="serviceCtx.searchOption_statusId" value="CRQ_ACCEPTED"/>
- <call-service service-name="updateSprintBacklogseq"
in-map-name="serviceCtx"/>
- </simple-method>
- <simple-method method-name="testUpdateSprintBacklogseqTOP"
short-description="Test Update Sprint Backlog Sequence on TOP"
login-required="false">
- <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.mode" value="TOP"/>
- <set field="serviceCtx.custRequestId" value="TEST9"/>
- <set field="serviceCtx.productId" value="DEMO-PRODUCT-1"/>
- <set field="serviceCtx.custRequestItemSeqId" value="TESTSEQ9"/>
- <set field="serviceCtx.statusId" value="CRQ_ACCEPTED"/>
- <set field="serviceCtx.searchOption_statusId" value="CRQ_ACCEPTED"/>
- <call-service service-name="updateSprintBacklogseq"
in-map-name="serviceCtx"/>
- </simple-method>
-</simple-methods>
diff --git a/scrum/minilang/test/ProductTest.xml
b/scrum/minilang/test/ProductTest.xml
deleted file mode 100644
index af878dc73..000000000
--- a/scrum/minilang/test/ProductTest.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
- <simple-method method-name="testCreateProductByAdmin"
short-description="" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.internalName" value="Demo Product 1"/>
- <set field="parameters.longDescription"
value="Demo-Create-Description"/>
- <set field="parameters.productTypeId" value="SCRUM_ITEM"/>
- <set field="parameters.statusId" value="PRODUCT_ACTIVE"/>
- <set field="parameters.partyId" value="DemoCustomer-1"/>
- <set field="parameters.partyCompany" value="Demo Scrum
Company[DemoScrumCompany] - Scrum Product Owner (DemoCustomer-1)"/>
- <call-simple-method method-name="createProductAndRole"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testUpdateProductByAdmin"
short-description="" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.internalName" value="Demo Product 1"/>
- <set field="parameters.longDescription"
value="Demo-Create-Description"/>
- <set field="parameters.productTypeId" value="SCRUM_ITEM"/>
- <set field="parameters.statusId" value="PRODUCT_ACTIVE"/>
- <set field="parameters.partyId" value="DemoCustomer-1"/>
- <set field="parameters.partyCompany" value="Demo Scrum
Company[DemoScrumCompany] - Scrum Product Owner (DemoCustomer-1)"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <call-simple-method method-name="updateProduct"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <!-- Billing -->
- <simple-method method-name="testAddProductTimeToNewInvoice"
short-description="Test Add Product Time To New Invoice" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="system"/>
- </entity-one>
- <set field="serviceCtx.productId" value="DEMO-PRODUCT-1"/>
- <set field="serviceCtx.partyIdFrom" value="Company"/>
- <set field="serviceCtx.partyId" value="DemoScrumCompany"/>
- <set field="serviceCtx.fromDate" value="2010-10-01 00:00:00.000"
type="Timestamp"/>
- <set field="serviceCtx.thruDate" value="2010-11-01 00:00:00.000"
type="Timestamp"/>
- <set field="serviceCtx.reCreate" value="N"/>
- <set field="serviceCtx.userLogin" from-field="userLogin"/>
- <call-service service-name="addProductTimeToNewInvoice"
in-map-name="serviceCtx">
- <result-to-field result-name="invoiceId"/>
- </call-service>
-
- <entity-one entity-name="Invoice" value-field="invoiceMap">
- <field-map field-name="invoiceId" from-field="invoiceId"/>
- </entity-one>
- <log level="info" message="invoiceId ============= >>>
${invoiceMap.invoiceId}"></log>
- <log level="info" message="partyIdFrom ============= >>>
${invoiceMap.partyIdFrom}"></log>
- <log level="info" message="partyId ============= >>>
${invoiceMap.partyId}"></log>
- <assert>
- <not><if-empty field="invoiceId"/></not>
- <not><if-empty field="invoiceMap"/></not>
- <if-compare field="invoiceMap.invoiceTypeId" operator="equals"
value="SALES_INVOICE" />
- <if-compare-field field="invoiceMap.partyIdFrom"
operator="equals" to-field="serviceCtx.partyIdFrom" />
- <if-compare-field field="invoiceMap.partyId" operator="equals"
to-field="serviceCtx.partyId" />
- </assert>
- <check-errors/>
- </simple-method>
-</simple-methods>
diff --git a/scrum/minilang/test/QATests.xml b/scrum/minilang/test/QATests.xml
deleted file mode 100644
index 8a14e1960..000000000
--- a/scrum/minilang/test/QATests.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
- <simple-method method-name="testCreateTestTask" short-description=""
login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="testadmin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="formInput.formInput.userLogin" from-field="userLogin"/>
- <set field="formInput.formInput.workEffortTypeId"
value="SCRUM_TASK_ERROR"/>
- <set field="formInput.formInput.currentStatusId"
value="STS_CREATED"/>
- <set field="formInput.formInput.roleTypeId" value="SCRUM_TEAM"/>
- <set field="formInput.formInput.statusId" value="SCAS_ASSIGNED"/>
- <set field="formInput.formInput.priority" value="1"/>
- <set field="formInput.formInput.description" value=""/>
- <set field="formInput.formInput.uploadedFile" value=""/>
- <set field="formInput.formInput.contentTypeId" value="DOCUMENT"/>
- <set field="formInput.formInput.resourceStatusId"
value="CTNT_PUBLISHED"/>
- <set field="formInput.formInput.workEffortContentTypeId"
value="CREATED_MEDIA"/>
- <set field="formInput.formInput.partyId" value="SCRUMTEAM-1"/>
- <call-simple-method method-name="createTestTask"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-</simple-methods>
diff --git a/scrum/minilang/test/ScrumProjectTests.xml
b/scrum/minilang/test/ScrumProjectTests.xml
deleted file mode 100644
index 5054e94bd..000000000
--- a/scrum/minilang/test/ScrumProjectTests.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
- <simple-method method-name="testCreateScrumProjectByProductOwner"
short-description="Test Create Scrum Project" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="productowner"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.workEffortId" value="TEST_WE_006"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.currentStatusId" value="SPJ_ACTIVE"/>
- <set field="parameters.workEffortName" value="TEST_WEN06"/>
- <set field="parameters.workEffortTypeId" value="SCRUM_PROJECT"/>
- <set field="parameters.partyId" value="DemoCustomer-1"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <call-simple-method method-name="createScrumProject"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testUpdateScrumProjectByProductOwner"
short-description="Test Create Scrum Project" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="productowner"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.workEffortId" value="TEST_WE_006"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.currentStatusId" value="SPJ_ACTIVE"/>
- <set field="parameters.workEffortName" value="TEST_WEN06_UPDATE"/>
- <set field="parameters.workEffortTypeId" value="SCRUM_PROJECT"/>
- <set field="parameters.partyId" value="DemoCustomer-1"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <call-simple-method method-name="updateScrumProject"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testUpdateScrumProjectByScrumMaster"
short-description="Test Create Scrum Project" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="productowner"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.workEffortId" value="TEST_WE_006"/>
- <set field="parameters.currentStatusId" value="SPJ_ACTIVE"/>
- <set field="parameters.workEffortName" value="TEST_WEN08_UPDATE"/>
- <set field="parameters.workEffortTypeId" value="SCRUM_PROJECT"/>
- <set field="parameters.partyId" value="SCRUMASTER"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <call-simple-method method-name="updateScrumProject"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testCloseScrumProject" short-description="Test
Close Scrum Project " login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.workEffortId" value="DEMO-PROJECT-1"/>
- <set field="parameters.productId" value="DEMO-PRODUCT-1"/>
- <set field="parameters.currentStatusId" value="SPJ_CLOSED" />
- <call-simple-method method-name="updateScrumProject"
xml-resource="component://scrum/minilang/ScrumEvents.xml" />
- </simple-method>
-
-</simple-methods>
diff --git a/scrum/minilang/test/ScrumTests.xml
b/scrum/minilang/test/ScrumTests.xml
deleted file mode 100644
index 337ab7cef..000000000
--- a/scrum/minilang/test/ScrumTests.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
- <simple-method method-name="testFindProjectWithSearchParameters"
short-description="Test find project service on certain search parameters"
login-required="false">
- <set field="searchParameters.workEffortTypeId" value="SCRUM_PROJECT"/>
- <entity-and entity-name="WorkEffort" list="workEffortList">
- <field-map field-name="workEffortTypeId"
from-field="searchParameters.workEffortTypeId"/>
- </entity-and>
- </simple-method>
-
-</simple-methods>
\ No newline at end of file
diff --git a/scrum/minilang/test/SprintBacklogTests.xml
b/scrum/minilang/test/SprintBacklogTests.xml
deleted file mode 100644
index 630f52085..000000000
--- a/scrum/minilang/test/SprintBacklogTests.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
- <simple-method method-name="testcreateSprintBacklogByAdmin"
short-description="" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.sprintBacklogs" value="1"/>
- <set field="parameters.projectId" value="DEMO-PROJECT-1"/>
- <set field="parameters.sprintId" value="DEMO-SPRINT-1"/>
- <call-simple-method method-name="createSprintBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testcreateSprintBacklogByScrummaster"
short-description="" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrummaster"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.sprintBacklogs" value="1"/>
- <set field="parameters.projectId" value="DEMO-PROJECT-1"/>
- <set field="parameters.sprintId" value="DEMO-SPRINT-1"/>
- <call-simple-method method-name="createSprintBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testdeleteSprintBacklogByAdmin"
short-description="" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.custRequestId" value="TEST1"/>
- <set field="parameters.sprintId" value="DEMO-SPRINT-1"/>
- <call-simple-method method-name="deleteSprintBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testdeleteSprintBacklogByScurmmaster"
short-description="" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrummaster"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.custRequestId" value="TEST2"/>
- <set field="parameters.sprintId" value="DEMO-SPRINT-1"/>
- <call-simple-method method-name="deleteSprintBacklog"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-</simple-methods>
diff --git a/scrum/minilang/test/SprintTests.xml
b/scrum/minilang/test/SprintTests.xml
deleted file mode 100644
index bbff90254..000000000
--- a/scrum/minilang/test/SprintTests.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
- <simple-method method-name="testUpdateSprintBacklog"
short-description="Update Sprint Backlog" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="system"/>
- </entity-one>
- <set field="parameters.custRequestId" value="TEST9"/>
- <set field="parameters.estimatedMilliSeconds" value="36000000"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set-service-fields service-name="updateCustRequest" map="parameters"
to-map="inMap"/>
- <call-service service-name="updateCustRequest" in-map-name="inMap"/>
- </simple-method>
-
- <simple-method method-name="testCreateSprintByScrummaster"
short-description="Test Create Sprint By Scrummaster" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrummaster"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.maxNum" value="20"/>
- <set field="parameters.projectId" value="DEMO-PROJECT-1"/>
- <set field="parameters.sprintName" value="SprintTest"/>
- <set field="parameters.sprintDescription" value="Test Create Sprint"/>
- <set field="parameters.sprintEstimatedStart" value="2010-07-23
11:44:08.418" type="Timestamp"/>
- <set field="parameters.sprintEstimatedEnd" value="2010-08-23
11:44:08.418" type="Timestamp"/>
- <set field="parameters.sprintBacklogs" value="1"/>
- <set field="parameters.custRequestName" value="TestSprint"/>
- <set field="parameters.sprintDuration" value="1"/>
- <call-simple-method method-name="createSprint"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testUpdateSprintByScrummaster"
short-description="Test Update Sprint By Scrummaster" login-required="false">
-
- <call-simple-method method-name="testCreateSprintByScrummaster"
xml-resource="component://scrum/minilang/test/SprintTests.xml"/>
-
- <set field="parameters.workEffortId" from-field="parameters.sprintId"/>
- <set field="parameters.workEffortName" value="SprintTest"/>
- <set field="parameters.actualStartDate" value="2010-07-23
11:44:08.418" type="Timestamp"/>
- <set field="parameters.currentStatusId" value="SPRINT_ACTIVE"/>
- <call-simple-method method-name="updateSprintInfo"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testCreateSprintByAdmin"
short-description="Test Create Sprint By Admin" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="admin"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <set field="parameters.maxNum" value="20"/>
- <set field="parameters.projectId" value="DEMO-PROJECT-1"/>
- <set field="parameters.sprintName" value="SprintTest"/>
- <set field="parameters.sprintDescription" value="SprintDescription"/>
- <set field="parameters.sprintEstimatedStart" value="2010-07-23
11:44:08.418" type="Timestamp"/>
- <set field="parameters.sprintEstimatedEnd" value="2010-08-23
11:44:08.418" type="Timestamp"/>
- <set field="parameters.sprintBacklogs" value="2"/>
- <set field="parameters.custRequestName" value="TestSprint"/>
- <set field="parameters.sprintDuration" value="1"/>
- <call-simple-method method-name="createSprint"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testUpdateSprintByAdmin"
short-description="Test Update Sprint By Admin" login-required="false">
-
- <call-simple-method method-name="testCreateSprintByAdmin"
xml-resource="component://scrum/minilang/test/SprintTests.xml"/>
-
- <set field="parameters.workEffortId" from-field="parameters.sprintId"/>
- <set field="parameters.workEffortName" value="SprintTest"/>
- <set field="parameters.actualStartDate" value="2010-07-23
11:44:08.418" type="Timestamp"/>
- <set field="parameters.currentStatusId" value="SPRINT_ACTIVE"/>
- <call-simple-method method-name="updateSprintInfo"
xml-resource="component://scrum/minilang/ScrumEvents.xml"/>
- </simple-method>
-
- <simple-method method-name="testAddSprintMember" short-description="Test
add Sprint member" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrummaster"/>
- </entity-one>
- <set field="parameters.workEffortId" value="DEMO-SPRINT-1"/>
- <set field="parameters.roleTypeId" value="SCRUM_TEAM"/>
- <set field="parameters.statusId" value="PRTYASGN_ASSIGNED"/>
- <set field="parameters.partyId" value="DemoCustomer-1"/>
- <set field="parameters.fromDate" value="2010-07-30 00:00:00.000"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <call-service service-name="assignPartyToWorkEffort"
in-map-name="parameters"/>
- </simple-method>
-
- <simple-method method-name="testRemoveSprintMember"
short-description="Test remove Sprint member" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrummaster"/>
- </entity-one>
- <set field="parameters.workEffortId" value="DEMO-SPRINT-1"/>
- <set field="parameters.roleTypeId" value="SCRUM_TEAM"/>
- <set field="parameters.partyId" value="DemoCustomer-1"/>
- <set field="parameters.fromDate" value="2010-07-30 00:00:00.000"/>
- <set field="parameters.userLogin" from-field="userLogin"/>
- <call-service service-name="unassignPartyFromWorkEffort"
in-map-name="parameters"/>
- </simple-method>
-</simple-methods>
diff --git a/scrum/minilang/test/TaskTests.xml
b/scrum/minilang/test/TaskTests.xml
deleted file mode 100644
index ee011f04e..000000000
--- a/scrum/minilang/test/TaskTests.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
- <!--
- <simple-method method-name="testViewScrumRevision"
short-description="Test View Scrum Revision" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="system"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="serviceCtx.userLogin" from-field="userLogin"/>
- <set field="serviceCtx.repository"
value="https://www.example.com/svn/"/>
- <set field="serviceCtx.revision" value="7"/>
- <call-service service-name="viewScrumRevision"
in-map-name="serviceCtx">
- <results-to-map map-name="result"/>
- </call-service>
- <assert>
- <and>
- <not><if-empty field="result.repository"/></not>
- <not><if-empty field="result.revision"/></not>
- <not><if-empty field="result.logMessage"/></not>
- </and>
- </assert>
- <check-errors/>
- </simple-method>
- -->
- <simple-method method-name="testViewScrumRevisionBadCall"
short-description="Test View Scrum Revision resist to a bad call"
login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="system"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="serviceCtx.userLogin" from-field="userLogin"/>
- <set field="serviceCtx.repository"
value="--diff+--diff-cmd=/bin/ls"/>
- <set field="serviceCtx.revision" value="7"/>
- <call-service service-name="viewScrumRevision"
in-map-name="serviceCtx">
- <results-to-map map-name="result"/>
- </call-service>
- <assert>
- <if-empty field="result.logMessage"/>
- </assert>
- <check-errors/>
- </simple-method>
- <!--
- <simple-method method-name="testRetrieveMissingScrumRevision"
short-description="Test Retrieve Missing Scrum Revision" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="system"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="serviceCtx.userLogin" from-field="userLogin"/>
- <set field="serviceCtx.repositoryRoot"
value="https://www.example.com/svn/scrum"/>
- <set field="serviceCtx.latestRevision" value="7"/>
- <call-service service-name="retrieveMissingScrumRevision"
in-map-name="serviceCtx">
- <results-to-map map-name="result"/>
- </call-service>
- <assert>
- <and>
- <if-compare field="result.responseMessage"
operator="equals" value="success" />
- </and>
- </assert>
- <check-errors/>
- </simple-method>
- <simple-method method-name="testRemoveDuplicateScrumRevision"
short-description="Test Remove Duplicate Scrum Revision" login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="system"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="serviceCtx.userLogin" from-field="userLogin"/>
- <set field="serviceCtx.repositoryRoot"
value="https://www.example.com/svn/scrum"/>
- <call-service service-name="removeDuplicateScrumRevision"
in-map-name="serviceCtx">
- <results-to-map map-name="result"/>
- </call-service>
- <assert>
- <and>
- <if-compare field="result.responseMessage"
operator="equals" value="success" />
- </and>
- </assert>
- <check-errors/>
- </simple-method>
- -->
-</simple-methods>
diff --git a/scrum/minilang/test/TimesheetTests.xml
b/scrum/minilang/test/TimesheetTests.xml
deleted file mode 100644
index 36a9dbd4e..000000000
--- a/scrum/minilang/test/TimesheetTests.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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"
- xmlns="http://ofbiz.apache.org/Simple-Method"
xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method
http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
- <simple-method method-name="testTimesheetToComplete"
short-description="Test set timesheet status to complete"
login-required="false">
- <entity-one entity-name="UserLogin" value-field="userLogin">
- <field-map field-name="userLoginId" value="scrumteam2"/>
- </entity-one>
- <set-current-user-login value-field="userLogin"/>
- <set field="inMap.timesheetId" value="DEMO-TIMESHEET1"/>
- <set field="inMap.statusId" value="TIMESHEET_COMPLETED"/>
- <call-service service-name="updateTimesheet" in-map-name="inMap"/>
- </simple-method>
-</simple-methods>
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/DailyMeetingMinuteTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/DailyMeetingMinuteTests.groovy
new file mode 100644
index 000000000..9cef8cf94
--- /dev/null
+++
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/DailyMeetingMinuteTests.groovy
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.
+
*******************************************************************************/
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class DailyMeetingMinuteTests extends OFBizTestCase {
+
+ DailyMeetingMinuteTests(String name) {
+ super(name)
+ }
+
+ // Migrated from DailyMeetingMinuteTests.xml:testDailyMinute
+ // Original called createDailyNote event in ScrumEvents.xml which creates
NoteData + WorkEffortNote.
+ // Equivalent: call createWorkEffortNote service which does the same.
+ void testDailyMinute() {
+ Map serviceCtx = [
+ workEffortId: 'DEMO-SPRINT-1',
+ noteInfo: 'NoteInfo',
+ noteName: 'NOTE-1-Name',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('createWorkEffortNote',
serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+}
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/MyWorkTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/MyWorkTests.groovy
new file mode 100644
index 000000000..889f48393
--- /dev/null
+++ b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/MyWorkTests.groovy
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * 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.
+
*******************************************************************************/
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.entity.util.EntityQuery
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class MyWorkTests extends OFBizTestCase {
+
+ MyWorkTests(String name) {
+ super(name)
+ }
+
+ // Migrated from
MyWorkTests.xml:testUpdateTimesheetEntryByWorkeffortNotComplete
+ void testUpdateTimesheetEntryByWorkeffortNotComplete() {
+ Map serviceCtx = [
+ timesheetId: 'DEMO-TIMESHEET1',
+ workEffortId: 'DEMO-TASK-1',
+ planHours_o_0: 2.0d,
+ hoursDay0_o_0: 1.0d,
+ checkComplete: 'N',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'updateTimesheetEntryByWorkeffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from
MyWorkTests.xml:testUpdateTimesheetEntryByWorkeffortComplete
+ void testUpdateTimesheetEntryByWorkeffortComplete() {
+ Map serviceCtx = [
+ timesheetId: 'DEMO-TIMESHEET1',
+ workEffortId: 'DEMO-TASK-1',
+ planHours_o_0: 2.0d,
+ hoursDay0_o_0: 1.0d,
+ checkComplete: 'Y',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'updateTimesheetEntryByWorkeffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from MyWorkTests.xml:testUpdateTask
+ // Original called updateTask event in ScrumEvents.xml which internally
calls updateWorkEffort.
+ void testUpdateTask() {
+ Map serviceCtx = [
+ workEffortId: 'DEMO-TASK-2',
+ estimatedMilliSeconds: 3600000L,
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from MyWorkTests.xml:testRemoveTaskAssignToMe
+ void testRemoveTaskAssignToMe() {
+ List<GenericValue> listWorkAssignment =
EntityQuery.use(delegator).from('WorkEffortPartyAssignment')
+ .where('workEffortId', 'DEMO-TASK-2',
+ 'partyId', 'SCRUMTEAM-2')
+ .queryList()
+ assert listWorkAssignment
+
+ GenericValue assignment = listWorkAssignment[0]
+ Map serviceCtx = [
+ workEffortId: 'DEMO-TASK-2',
+ partyId: 'SCRUMTEAM-2',
+ roleTypeId: assignment.roleTypeId,
+ fromDate: assignment.fromDate,
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'unassignPartyFromWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from MyWorkTests.xml:testAddNewTimesheet
+ void testAddNewTimesheet() {
+ Map serviceCtx = [
+ partyId: 'SCRUMTEAM-2',
+ requiredDate: java.sql.Timestamp.valueOf(
+ '2010-08-23 11:44:08.418'),
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'createTimesheetForThisWeek', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from MyWorkTests.xml:testSetTimeSheetStatusToComplete
+ void testSetTimeSheetStatusToComplete() {
+ Map serviceCtx = [
+ timesheetId: 'DEMO-TIMESHEET2',
+ statusId: 'TIMESHEET_COMPLETED',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateTimesheet', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+}
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ProductBacklogTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ProductBacklogTests.groovy
new file mode 100644
index 000000000..bade4c9c0
--- /dev/null
+++
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ProductBacklogTests.groovy
@@ -0,0 +1,273 @@
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class ProductBacklogTests extends OFBizTestCase {
+
+ ProductBacklogTests(String name) {
+ super(name)
+ }
+
+ void testAdminOperations() {
+ GenericValue adminUserLogin = from('UserLogin').where('userLoginId',
'admin').queryOne()
+ assert adminUserLogin
+
+ // Create
+ Map createCtx = [
+ custRequestName: 'TEST Product Backlog',
+ productId: 'DEMO-PRODUCT-1',
+ description: 'TEST Product Backlog',
+ custRequestTypeId: 'RF_PROD_BACKLOG',
+ statusId: 'CRQ_ACCEPTED',
+ fromPartyId: adminUserLogin.partyId,
+ userLogin: adminUserLogin
+ ]
+ Map createResult = dispatcher.runSync('createCustRequest', createCtx)
+ assert ServiceUtil.isSuccess(createResult)
+
+ // Update
+ Map updateCtx = [
+ custRequestId: 'TEST5',
+ custRequestName: 'TEST Product Backlog',
+ description: 'TEST Product Backlog',
+ statusId: 'CRQ_ACCEPTED',
+ userLogin: adminUserLogin
+ ]
+ Map updateResult = dispatcher.runSync('updateCustRequest', updateCtx)
+ assert ServiceUtil.isSuccess(updateResult)
+
+ // Delete
+ GenericValue result = from('CustRequest').where('custRequestId',
'TEST5').queryOne()
+ if (result && result.statusId == 'CRQ_ACCEPTED') {
+ Map deleteCtx = [
+ custRequestId: 'TEST5',
+ statusId: 'CRQ_CANCELLED',
+ userLogin: adminUserLogin
+ ]
+ Map deleteResult = dispatcher.runSync('updateCustRequest',
deleteCtx)
+ assert ServiceUtil.isSuccess(deleteResult)
+ }
+ }
+
+ void testProductOwnerOperations() {
+ GenericValue poUserLogin = from('UserLogin').where('userLoginId',
'productowner').queryOne()
+ assert poUserLogin
+
+ // Create
+ Map createCtx = [
+ custRequestName: 'TEST Product Backlog',
+ productId: 'DEMO-PRODUCT-1',
+ description: 'TEST Product Backlog',
+ custRequestTypeId: 'RF_PROD_BACKLOG',
+ statusId: 'CRQ_ACCEPTED',
+ fromPartyId: poUserLogin.partyId,
+ userLogin: poUserLogin
+ ]
+ Map createResult = dispatcher.runSync('createCustRequest', createCtx)
+ assert ServiceUtil.isSuccess(createResult)
+
+ // Update
+ Map updateCtx = [
+ custRequestId: 'TEST6',
+ custRequestName: 'TEST Product Backlog',
+ description: 'TEST Product Backlog',
+ statusId: 'CRQ_ACCEPTED',
+ userLogin: poUserLogin
+ ]
+ Map updateResult = dispatcher.runSync('updateCustRequest', updateCtx)
+ assert ServiceUtil.isSuccess(updateResult)
+
+ // Delete
+ GenericValue result = from('CustRequest').where('custRequestId',
'TEST6').queryOne()
+ if (result && result.statusId == 'CRQ_ACCEPTED') {
+ Map deleteCtx = [
+ custRequestId: 'TEST6',
+ statusId: 'CRQ_CANCELLED',
+ userLogin: poUserLogin
+ ]
+ Map deleteResult = dispatcher.runSync('updateCustRequest',
deleteCtx)
+ assert ServiceUtil.isSuccess(deleteResult)
+ }
+ }
+
+ void testScrumMasterOperations() {
+ GenericValue smUserLogin = from('UserLogin').where('userLoginId',
'scrummaster').queryOne()
+ assert smUserLogin
+
+ // Create
+ Map createCtx = [
+ custRequestName: 'TEST Product Backlog',
+ productId: 'DEMO-PRODUCT-1',
+ description: 'TEST Product Backlog',
+ custRequestTypeId: 'RF_PROD_BACKLOG',
+ statusId: 'CRQ_ACCEPTED',
+ fromPartyId: smUserLogin.partyId,
+ userLogin: smUserLogin
+ ]
+ Map createResult = dispatcher.runSync('createCustRequest', createCtx)
+ assert ServiceUtil.isSuccess(createResult)
+
+ // Delete
+ Map deleteCtx = [
+ custRequestId: 'TEST7',
+ statusId: 'CRQ_CANCELLED',
+ userLogin: smUserLogin
+ ]
+ Map deleteResult = dispatcher.runSync('updateCustRequest', deleteCtx)
+ assert ServiceUtil.isSuccess(deleteResult)
+ }
+
+ void testCreateBacklogSetStatus() {
+ GenericValue poUserLogin = from('UserLogin').where('userLoginId',
'productowner').queryOne()
+ Map serviceCtx = [
+ custRequestName: 'TEST Product Backlog',
+ productId: 'DEMO-PRODUCT-1',
+ description: 'TEST Product Backlog',
+ custRequestTypeId: 'RF_PROD_BACKLOG',
+ statusId: 'CRQ_ACCEPTED',
+ fromPartyId: poUserLogin.partyId,
+ userLogin: poUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('createCustRequest', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ void testCreateDefaultBacklogs() {
+ GenericValue adminUserLogin = from('UserLogin').where('userLoginId',
'admin').queryOne()
+ Map serviceCtx = [
+ workEffortName: 'Test Default Task',
+ description: 'Test Project',
+ workEffortTypeId: 'SCRUM_TASK_IMPL',
+ workEffortPurposeTypeId: 'SCRUM_DEFAULT_TASK',
+ currentStatusId: 'STS_CREATED',
+ userLogin: adminUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('createWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ void testProductBacklogCategoryOperations() {
+ GenericValue adminUserLogin = from('UserLogin').where('userLoginId',
'admin').queryOne()
+
+ // Create
+ Map createCtx = [
+ custRequestName: 'Backlog',
+ custRequestTypeId: 'RF_PROD_BACKLOG',
+ statusId: 'CRQ_ACCEPTED',
+ fromPartyId: adminUserLogin.partyId,
+ userLogin: adminUserLogin
+ ]
+ Map createResult = dispatcher.runSync('createCustRequest', createCtx)
+ assert ServiceUtil.isSuccess(createResult)
+
+ String custRequestId = createResult.custRequestId
+ Map itemCtx = [
+ custRequestId: custRequestId,
+ productId: 'DEMO-PRODUCT-1',
+ userLogin: adminUserLogin
+ ]
+ Map itemResult = dispatcher.runSync('createCustRequestItem', itemCtx)
+ assert ServiceUtil.isSuccess(itemResult)
+
+ // Update
+ Map updateCtx = [
+ custRequestId: 'TEST10',
+ custRequestName: 'Backlog',
+ userLogin: adminUserLogin
+ ]
+ Map updateResult = dispatcher.runSync('updateCustRequest', updateCtx)
+ assert ServiceUtil.isSuccess(updateResult)
+ }
+
+ void testProductBacklogEmailOperations() {
+ GenericValue systemUserLogin = from('UserLogin').where('userLoginId',
'system').queryOne()
+
+ // Create
+ Map createCtx = [
+ productId: 'DEMO-PRODUCT-1',
+ custRequestId: 'TEST10',
+ communicationEventTypeId: 'EMAIL_COMMUNICATION',
+ partyIdFrom: 'DemoCustomer-1',
+ partyIdTo: 'SCRUMASTER',
+ subject: 'Test New Product Backlog Email',
+ userLogin: systemUserLogin
+ ]
+ Map createResult = dispatcher.runSync('createCommunicationEvent',
createCtx)
+ assert ServiceUtil.isSuccess(createResult)
+
+ // Update
+ Map updateCtx = [
+ communicationEventId: 'DEMO-COM-PRODUCT-1',
+ productId: 'DEMO-PRODUCT-1',
+ custRequestId: 'TEST10',
+ communicationEventTypeId: 'EMAIL_COMMUNICATION',
+ subject: 'Test New Product Backlog Email',
+ userLogin: systemUserLogin
+ ]
+ Map updateResult = dispatcher.runSync('updateCommunicationEvent',
updateCtx)
+ assert ServiceUtil.isSuccess(updateResult)
+ }
+
+ void testUpdateSprintBacklogseqDown() {
+ GenericValue systemUserLogin = from('UserLogin').where('userLoginId',
'system').queryOne()
+ Map serviceCtx = [
+ mode: 'DWN',
+ custRequestId: 'TEST9',
+ productId: 'DEMO-PRODUCT-1',
+ custRequestItemSeqId: 'TESTSEQ9',
+ statusId: 'CRQ_ACCEPTED',
+ searchOption_statusId: 'CRQ_ACCEPTED',
+ userLogin: systemUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateSprintBacklogseq',
serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ void testUpdateSprintBacklogseqUP() {
+ GenericValue systemUserLogin = from('UserLogin').where('userLoginId',
'system').queryOne()
+ Map serviceCtx = [
+ mode: 'UP',
+ custRequestId: 'TEST9',
+ productId: 'DEMO-PRODUCT-1',
+ custRequestItemSeqId: 'TESTSEQ9',
+ statusId: 'CRQ_ACCEPTED',
+ searchOption_statusId: 'CRQ_ACCEPTED',
+ userLogin: systemUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateSprintBacklogseq',
serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ void testUpdateSprintBacklogseqBotton() {
+ GenericValue systemUserLogin = from('UserLogin').where('userLoginId',
'system').queryOne()
+ Map serviceCtx = [
+ mode: 'BOT',
+ custRequestId: 'TEST9',
+ productId: 'DEMO-PRODUCT-1',
+ custRequestItemSeqId: 'TESTSEQ9',
+ statusId: 'CRQ_ACCEPTED',
+ searchOption_statusId: 'CRQ_ACCEPTED',
+ userLogin: systemUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateSprintBacklogseq',
serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ void testUpdateSprintBacklogseqTOP() {
+ GenericValue systemUserLogin = from('UserLogin').where('userLoginId',
'system').queryOne()
+ Map serviceCtx = [
+ mode: 'TOP',
+ custRequestId: 'TEST9',
+ productId: 'DEMO-PRODUCT-1',
+ custRequestItemSeqId: 'TESTSEQ9',
+ statusId: 'CRQ_ACCEPTED',
+ searchOption_statusId: 'CRQ_ACCEPTED',
+ userLogin: systemUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateSprintBacklogseq',
serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+}
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ProductTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ProductTests.groovy
new file mode 100644
index 000000000..1a9a6d18b
--- /dev/null
+++ b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ProductTests.groovy
@@ -0,0 +1,114 @@
+/*
+ * 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.
+ */
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.base.util.UtilDateTime
+import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+import java.sql.Timestamp
+
+@SuppressWarnings(['LineLength', 'UnnecessaryObjectReferences',
'UnnecessaryGString', 'PublicMethodsBeforeNonPublicMethods', 'ClassSize',
'MethodCount', 'ConsecutiveBlankLines', 'BlockEndsWithBlankLine',
'ClassEndsWithBlankLine'])
+class ProductTests extends OFBizTestCase {
+
+ ProductTests(String name) {
+ super(name)
+ }
+
+ void testCreateProductByAdmin() {
+ GenericValue adminUserLogin = from('UserLogin').where('userLoginId',
'admin').queryOne()
+ assert adminUserLogin
+
+ Map serviceCtx = [
+ internalName: 'Demo Product 1',
+ longDescription: 'Demo-Create-Description',
+ productTypeId: 'SCRUM_ITEM',
+ introductionDate: UtilDateTime.nowTimestamp(),
+ userLogin: adminUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('createProduct', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ String productId = serviceResult.productId
+ assert productId
+
+ Map roleCtx = [
+ productId: productId,
+ partyId: 'DemoCustomer-1',
+ roleTypeId: 'PRODUCT_OWNER',
+ userLogin: adminUserLogin
+ ]
+ Map roleResult = dispatcher.runSync('addPartyToProduct', roleCtx)
+ assert ServiceUtil.isSuccess(roleResult)
+ }
+
+ void testUpdateProductByAdmin() {
+ GenericValue adminUserLogin = from('UserLogin').where('userLoginId',
'admin').queryOne()
+ assert adminUserLogin
+
+ Map serviceCtx = [
+ productId: 'DEMO-PRODUCT-1',
+ internalName: 'Demo Product 1 Updated',
+ longDescription: 'Demo-Update-Description',
+ productTypeId: 'SCRUM_ITEM',
+ userLogin: adminUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateProduct', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+
+ // Minilang test also calls createProductRole again (effectively
updating/ensuring it exists)
+ Map roleCtx = [
+ productId: 'DEMO-PRODUCT-1',
+ partyId: 'DemoCustomer-1',
+ roleTypeId: 'PRODUCT_OWNER',
+ userLogin: adminUserLogin
+ ]
+ dispatcher.runSync('addPartyToProduct', roleCtx)
+ // If it exists, addPartyToProduct might fail or do nothing depending
on fromDate.
+ // We ensure the test passes by checking it doesn't hard fail if it's
already there.
+ }
+
+ void testAddProductTimeToNewInvoice() {
+ GenericValue adminUserLogin = from('UserLogin').where('userLoginId',
'admin').queryOne()
+ assert adminUserLogin
+
+ Timestamp fromDate = Timestamp.valueOf('2010-10-01 00:00:00.000')
+ Timestamp thruDate = Timestamp.valueOf('2010-11-01 00:00:00.000')
+
+ Map serviceCtx = [
+ productId: 'DEMO-PRODUCT-1',
+ partyIdFrom: 'Company',
+ partyId: 'DemoScrumCompany',
+ fromDate: fromDate,
+ thruDate: thruDate,
+ reCreate: 'N',
+ userLogin: adminUserLogin
+ ]
+ Map serviceResult = dispatcher.runSync('addProductTimeToNewInvoice',
serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ String invoiceId = serviceResult.invoiceId
+ assert invoiceId
+
+ GenericValue invoice = from('Invoice').where('invoiceId',
invoiceId).queryOne()
+ assert invoice
+ assert invoice.invoiceTypeId == 'SALES_INVOICE'
+ assert invoice.partyIdFrom == 'Company'
+ assert invoice.partyId == 'DemoScrumCompany'
+ }
+
+}
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ScrumProjectTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ScrumProjectTests.groovy
new file mode 100644
index 000000000..161137bcc
--- /dev/null
+++ b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ScrumProjectTests.groovy
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * 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.
+
*******************************************************************************/
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class ScrumProjectTests extends OFBizTestCase {
+
+ ScrumProjectTests(String name) {
+ super(name)
+ }
+
+ // Migrated from ScrumProjectTests.xml:testCreateScrumProjectByProductOwner
+ // Original called createScrumProject event which internally calls
createWorkEffort service.
+ void testCreateScrumProjectByProductOwner() {
+ Map serviceCtx = [
+ workEffortId: 'TEST_WE_006',
+ workEffortName: 'TEST_WEN06',
+ workEffortTypeId: 'SCRUM_PROJECT',
+ currentStatusId: 'SPJ_ACTIVE',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('createWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from ScrumProjectTests.xml:testUpdateScrumProjectByProductOwner
+ void testUpdateScrumProjectByProductOwner() {
+ Map createCtx = [
+ workEffortId: 'TEST_WE_007',
+ workEffortName: 'TEST_WEN07',
+ workEffortTypeId: 'SCRUM_PROJECT',
+ currentStatusId: 'SPJ_ACTIVE',
+ userLogin: userLogin
+ ]
+ dispatcher.runSync('createWorkEffort', createCtx)
+
+ Map serviceCtx = [
+ workEffortId: 'TEST_WE_007',
+ workEffortName: 'TEST_WEN07_UPDATE',
+ workEffortTypeId: 'SCRUM_PROJECT',
+ currentStatusId: 'SPJ_ACTIVE',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from ScrumProjectTests.xml:testUpdateScrumProjectByScrumMaster
+ void testUpdateScrumProjectByScrumMaster() {
+ Map createCtx = [
+ workEffortId: 'TEST_WE_008',
+ workEffortName: 'TEST_WEN08',
+ workEffortTypeId: 'SCRUM_PROJECT',
+ currentStatusId: 'SPJ_ACTIVE',
+ userLogin: userLogin
+ ]
+ dispatcher.runSync('createWorkEffort', createCtx)
+
+ Map serviceCtx = [
+ workEffortId: 'TEST_WE_008',
+ workEffortName: 'TEST_WEN08_UPDATE',
+ workEffortTypeId: 'SCRUM_PROJECT',
+ currentStatusId: 'SPJ_ACTIVE',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from ScrumProjectTests.xml:testCloseScrumProject
+ void testCloseScrumProject() {
+ Map serviceCtx = [
+ workEffortId: 'DEMO-PROJECT-1',
+ currentStatusId: 'SPJ_CLOSED',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+}
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ScrumTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ScrumTests.groovy
new file mode 100644
index 000000000..5233768dd
--- /dev/null
+++ b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/ScrumTests.groovy
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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.
+
*******************************************************************************/
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.entity.util.EntityQuery
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class ScrumTests extends OFBizTestCase {
+
+ ScrumTests(String name) {
+ super(name)
+ }
+
+ // Migrated from ScrumTests.xml:testFindProjectWithSearchParameters
+ void testFindProjectWithSearchParameters() {
+ List<GenericValue> workEffortList =
EntityQuery.use(delegator).from('WorkEffort')
+ .where('workEffortTypeId', 'SCRUM_PROJECT')
+ .queryList()
+ assert workEffortList != null
+ }
+
+}
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/SprintBacklogTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/SprintBacklogTests.groovy
new file mode 100644
index 000000000..8ac9dfff3
--- /dev/null
+++
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/SprintBacklogTests.groovy
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.
+
*******************************************************************************/
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class SprintBacklogTests extends OFBizTestCase {
+
+ SprintBacklogTests(String name) {
+ super(name)
+ }
+
+ // Migrated from SprintBacklogTests.xml:testcreateSprintBacklogByAdmin
+ // Original called createSprintBacklog event which internally calls
createWorkEffortRequest service.
+ void testCreateSprintBacklogByAdmin() {
+ Map serviceCtx = [
+ custRequestId: 'TEST5',
+ workEffortId: 'DEMO-SPRINT-1',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'createWorkEffortRequest', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from
SprintBacklogTests.xml:testcreateSprintBacklogByScrummaster
+ void testCreateSprintBacklogByScrummaster() {
+ Map serviceCtx = [
+ custRequestId: 'TEST6',
+ workEffortId: 'DEMO-SPRINT-1',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'createWorkEffortRequest', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from SprintBacklogTests.xml:testdeleteSprintBacklogByAdmin
+ void testDeleteSprintBacklogByAdmin() {
+ Map serviceCtx = [
+ custRequestId: 'TEST1',
+ workEffortId: 'DEMO-SPRINT-1',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'deleteWorkEffortRequest', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from
SprintBacklogTests.xml:testdeleteSprintBacklogByScurmmaster
+ void testDeleteSprintBacklogByScrummaster() {
+ Map serviceCtx = [
+ custRequestId: 'TEST2',
+ workEffortId: 'DEMO-SPRINT-1',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'deleteWorkEffortRequest', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+}
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/SprintTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/SprintTests.groovy
new file mode 100644
index 000000000..e13fa02ba
--- /dev/null
+++ b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/SprintTests.groovy
@@ -0,0 +1,140 @@
+/*******************************************************************************
+ * 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.
+
*******************************************************************************/
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class SprintTests extends OFBizTestCase {
+
+ SprintTests(String name) {
+ super(name)
+ }
+
+ // Migrated from SprintTests.xml:testUpdateSprintBacklog
+ void testUpdateSprintBacklog() {
+ Map serviceCtx = [
+ custRequestId: 'TEST9',
+ estimatedMilliSeconds: 36000000L,
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateCustRequest', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from SprintTests.xml:testCreateSprintByScrummaster
+ void testCreateSprintByScrummaster() {
+ String sprintId = createSprint()
+ assert sprintId
+ }
+
+ // Migrated from SprintTests.xml:testUpdateSprintByScrummaster
+ void testUpdateSprintByScrummaster() {
+ String sprintId = createSprint()
+ Map serviceCtx = [
+ workEffortId: sprintId,
+ workEffortName: 'SprintTest',
+ currentStatusId: 'SPRINT_ACTIVE',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from SprintTests.xml:testCreateSprintByAdmin
+ void testCreateSprintByAdmin() {
+ String sprintId = createSprint()
+ assert sprintId
+ }
+
+ // Migrated from SprintTests.xml:testUpdateSprintByAdmin
+ void testUpdateSprintByAdmin() {
+ String sprintId = createSprint()
+ Map serviceCtx = [
+ workEffortId: sprintId,
+ workEffortName: 'SprintTest',
+ currentStatusId: 'SPRINT_ACTIVE',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from SprintTests.xml:testAddSprintMember
+ void testAddSprintMember() {
+ Map serviceCtx = [
+ workEffortId: 'DEMO-SPRINT-1',
+ roleTypeId: 'SCRUM_TEAM',
+ statusId: 'PRTYASGN_ASSIGNED',
+ partyId: 'DemoCustomer-1',
+ fromDate: java.sql.Timestamp.valueOf(
+ '2010-07-30 00:00:00.000'),
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'assignPartyToWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ // Migrated from SprintTests.xml:testRemoveSprintMember
+ void testRemoveSprintMember() {
+ Map serviceCtx = [
+ workEffortId: 'DEMO-SPRINT-1',
+ roleTypeId: 'SCRUM_TEAM',
+ statusId: 'PRTYASGN_ASSIGNED',
+ partyId: 'DemoCustomer-1',
+ fromDate: java.sql.Timestamp.valueOf('2010-07-31
00:00:00.000'),
+ userLogin: userLogin
+ ]
+ // Assign first so we can safely remove it regardless of test
execution order
+ dispatcher.runSync('assignPartyToWorkEffort', serviceCtx)
+
+ Map removeCtx = [
+ workEffortId: 'DEMO-SPRINT-1',
+ roleTypeId: 'SCRUM_TEAM',
+ partyId: 'DemoCustomer-1',
+ fromDate: java.sql.Timestamp.valueOf('2010-07-31
00:00:00.000'),
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync(
+ 'unassignPartyFromWorkEffort', removeCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+ /**
+ * Helper: creates a sprint via createWorkEffort service.
+ * The original XML called createSprint event in ScrumEvents.xml,
+ * which internally creates a WorkEffort of type SCRUM_SPRINT.
+ */
+ protected String createSprint() {
+ Map serviceCtx = [
+ workEffortName: 'SprintTest',
+ description: 'Test Create Sprint',
+ workEffortTypeId: 'SCRUM_SPRINT',
+ currentStatusId: 'SPRINT_ACTIVE',
+ workEffortParentId: 'DEMO-PROJECT-1',
+ estimatedMilliSeconds: 1440000000L,
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('createWorkEffort', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ return serviceResult.workEffortId
+ }
+
+}
diff --git a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/TaskTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/TaskTests.groovy
new file mode 100644
index 000000000..4607b1cd9
--- /dev/null
+++ b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/TaskTests.groovy
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * 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.
+
*******************************************************************************/
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class TaskTests extends OFBizTestCase {
+
+ TaskTests(String name) {
+ super(name)
+ }
+
+ // Migrated from TaskTests.xml:testViewScrumRevisionBadCall
+ // Tests that viewScrumRevision service handles a bad repository URL
gracefully
+ void testViewScrumRevisionBadCall() {
+ Map serviceCtx = [
+ repository: '--diff+--diff-cmd=/bin/ls',
+ revision: '7',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('viewScrumRevision', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ assert !serviceResult.logMessage
+ }
+
+}
diff --git
a/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/TimesheetTests.groovy
b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/TimesheetTests.groovy
new file mode 100644
index 000000000..05aab3cfe
--- /dev/null
+++ b/scrum/src/main/groovy/org/apache/ofbiz/scrum/test/TimesheetTests.groovy
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.
+
*******************************************************************************/
+package org.apache.ofbiz.scrum.test
+
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.service.testtools.OFBizTestCase
+
+class TimesheetTests extends OFBizTestCase {
+
+ TimesheetTests(String name) {
+ super(name)
+ }
+
+ // Migrated from TimesheetTests.xml:testTimesheetToComplete
+ void testTimesheetToComplete() {
+ Map serviceCtx = [
+ timesheetId: 'DEMO-TIMESHEET1',
+ statusId: 'TIMESHEET_COMPLETED',
+ userLogin: userLogin
+ ]
+ Map serviceResult = dispatcher.runSync('updateTimesheet', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
+
+}
diff --git a/scrum/testdef/scrumTests.xml b/scrum/testdef/scrumTests.xml
index cbb2e73a9..b7e0e0c85 100644
--- a/scrum/testdef/scrumTests.xml
+++ b/scrum/testdef/scrumTests.xml
@@ -20,40 +20,6 @@ under the License.
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
- <test-case case-name="scrum-tests">
- <simple-method-test
location="component://scrum/minilang/test/ScrumTests.xml"/>
- </test-case>
- <test-case case-name="productBacklog-tests">
- <simple-method-test
location="component://scrum/minilang/test/ProductBacklogTest.xml"/>
- </test-case>
- <test-case case-name="scrumProject-tests">
- <simple-method-test
location="component://scrum/minilang/test/ScrumProjectTests.xml"/>
- </test-case>
- <test-case case-name="sprint-tests">
- <simple-method-test
location="component://scrum/minilang/test/SprintTests.xml"/>
- </test-case>
- <test-case case-name="sprintBacklog-tests">
- <simple-method-test
location="component://scrum/minilang/test/SprintBacklogTests.xml"/>
- </test-case>
- <test-case case-name="dailyMeetingMinute-tests">
- <simple-method-test
location="component://scrum/minilang/test/DailyMeetingMinuteTests.xml"/>
- </test-case>
- <test-case case-name="product-tests">
- <simple-method-test
location="component://scrum/minilang/test/ProductTest.xml"/>
- </test-case>
- <test-case case-name="task-test">
- <simple-method-test
location="component://scrum/minilang/test/TaskTests.xml"/>
- </test-case>
- <test-case case-name="myWork-test">
- <simple-method-test
location="component://scrum/minilang/test/MyWorkTests.xml"/>
- </test-case>
- <test-case case-name="timesheet-test">
- <simple-method-test
location="component://scrum/minilang/test/TimesheetTests.xml"/>
- </test-case>
- <!-- test-case case-name="qa-tests">
- <simple-method-test
location="component://scrum/minilang/test/QATests.xml"/>
- </test-case-->
-
<!-- Tests data load -->
<test-case case-name="scrum-type-data">
<entity-xml action="load"
entity-xml-url="component://scrum/data/scrumTypeData.xml"/>
@@ -64,4 +30,35 @@ under the License.
<test-case case-name="scrum-demo-data">
<entity-xml action="load"
entity-xml-url="component://scrum/data/scrumDemoData.xml"/>
</test-case>
+
+ <test-group case-name="scrum-tests">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.ScrumTests"/>
+ </test-group>
+ <test-group case-name="productBacklog-tests">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.ProductBacklogTests"/>
+ </test-group>
+ <test-group case-name="scrumProject-tests">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.ScrumProjectTests"/>
+ </test-group>
+ <test-group case-name="sprint-tests">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.SprintTests"/>
+ </test-group>
+ <test-group case-name="sprintBacklog-tests">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.SprintBacklogTests"/>
+ </test-group>
+ <test-group case-name="dailyMeetingMinute-tests">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.DailyMeetingMinuteTests"/>
+ </test-group>
+ <test-group case-name="product-tests">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.ProductTests"/>
+ </test-group>
+ <test-group case-name="task-test">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.TaskTests"/>
+ </test-group>
+ <test-group case-name="myWork-test">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.MyWorkTests"/>
+ </test-group>
+ <test-group case-name="timesheet-test">
+ <junit-test-suite
class-name="org.apache.ofbiz.scrum.test.TimesheetTests"/>
+ </test-group>
</test-suite>