svn commit: r1856596 - in /ofbiz/ofbiz-framework/trunk/applications/order: groovyScripts/test/OrderTests.groovy testdef/OrderTest.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1856596 - in /ofbiz/ofbiz-framework/trunk/applications/order: groovyScripts/test/OrderTests.groovy testdef/OrderTest.xml

surajk
Author: surajk
Date: Sat Mar 30 05:13:33 2019
New Revision: 1856596

URL: http://svn.apache.org/viewvc?rev=1856596&view=rev
Log:
Added: Unit test case for service - AddRequirementTask.
(OFBIZ-8931)
Thanks Avnindra Sharma for reporting and Pawan Verma for providing the updated patch.

Added:
    ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy   (with props)
Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/testdef/OrderTest.xml

Added: ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy?rev=1856596&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy (added)
+++ ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy Sat Mar 30 05:13:33 2019
@@ -0,0 +1,13 @@
+import org.apache.ofbiz.entity.util.EntityQuery
+import org.apache.ofbiz.service.ServiceUtil
+import org.apache.ofbiz.testtools.GroovyScriptTestCase
+class OrderTests extends GroovyScriptTestCase {
+    void testAddRequirementTask() {
+        Map serviceCtx = [:]
+        serviceCtx.requirementId = "1000"
+        serviceCtx.workEffortId = "9000"
+        serviceCtx.userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne()
+        Map serviceResult = dispatcher.runSync("addRequirementTask", serviceCtx)
+        assert ServiceUtil.isSuccess(serviceResult)
+    }
+}

Propchange: ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/ofbiz-framework/trunk/applications/order/testdef/OrderTest.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/testdef/OrderTest.xml?rev=1856596&r1=1856595&r2=1856596&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/testdef/OrderTest.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/testdef/OrderTest.xml Sat Mar 30 05:13:33 2019
@@ -33,4 +33,7 @@ under the License.
     <test-case case-name="order-test">
         <simple-method-test location="component://order/minilang/test/OrderTests.xml"/>
     </test-case>
+    <test-case case-name="order-tests">
+        <groovy-test-suite location="component://order/groovyScripts/test/OrderTests.groovy"/>
+    </test-case>
 </test-suite>