svn commit: r642365 - in /ofbiz/trunk/applications/product: ofbiz-component.xml script/org/ofbiz/shipment/shipment/ShipmentServices.xml testdef/ProductTest.xml testdef/assertdata/ testdef/assertdata/TestUserLoginData.xml

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

svn commit: r642365 - in /ofbiz/trunk/applications/product: ofbiz-component.xml script/org/ofbiz/shipment/shipment/ShipmentServices.xml testdef/ProductTest.xml testdef/assertdata/ testdef/assertdata/TestUserLoginData.xml

mrisaliti
Author: mrisaliti
Date: Fri Mar 28 13:17:57 2008
New Revision: 642365

URL: http://svn.apache.org/viewvc?rev=642365&view=rev
Log:
A patch from Shubham Goyal "JUnit Test Case for Receive Other Shipment" (OFBIZ-1465)

Added:
    ofbiz/trunk/applications/product/testdef/ProductTest.xml   (with props)
    ofbiz/trunk/applications/product/testdef/assertdata/
    ofbiz/trunk/applications/product/testdef/assertdata/TestUserLoginData.xml   (with props)
Modified:
    ofbiz/trunk/applications/product/ofbiz-component.xml
    ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml

Modified: ofbiz/trunk/applications/product/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/ofbiz-component.xml?rev=642365&r1=642364&r2=642365&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/ofbiz-component.xml (original)
+++ ofbiz/trunk/applications/product/ofbiz-component.xml Fri Mar 28 13:17:57 2008
@@ -59,6 +59,7 @@
 
     <!-- test suite -->
     <test-suite loader="main" location="testdef/FacilityTest.xml"/>
+    <test-suite loader="main" location="testdef/ProductTest.xml"/>
     
     <webapp name="catalog" title="Catalog" server="default-server" location="webapp/catalog"
         base-permission="OFBTOOLS,CATALOG" mount-point="/catalog"/>

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=642365&r1=642364&r2=642365&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml Fri Mar 28 13:17:57 2008
@@ -1930,6 +1930,29 @@
         <remove-value value-name="quantityBreak"/>
         <check-errors/>
     </simple-method>
+    
+     <!--Service for test Shipment Service -->
+    <simple-method method-name="testCreateShipmentRouteSegment" short-description="Test to create Shipment Route Segment" login-required="false">
+        <log level="info" message="====================Create a Shipment Route Segment test case=========================================="/>
+        <set field="shipRouteSegMap.shipmentId" value="10000"/>
+        
+        <entity-one entity-name="UserLogin" value-name="shipRouteSegMap.userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <call-service service-name="createShipmentRouteSegment" in-map-name="shipRouteSegMap">
+            <result-to-field result-name="shipmentRouteSegmentId" field-name="shipmentRouteSegmentId" map-name="routeSegMap"/>
+        </call-service>
+        <entity-one entity-name="ShipmentRouteSegment" value-name="shipmentRouteSegment">
+            <field-map field-name="shipmentId" env-name="shipRouteSegMap.shipmentId"/>
+            <field-map field-name="shipmentRouteSegmentId" env-name="routeSegMap.shipmentRouteSegmentId"/>
+        </entity-one>
+        <assert>
+            <not><if-empty field-name="shipmentRouteSegment"/></not>
+            <if-compare-field field-name="shipmentRouteSegment.shipmentId" operator="equals" to-field-name="shipRouteSegMap.shipmentId"/>
+            <if-compare-field field-name="shipmentRouteSegment.shipmentRouteSegmentId" operator="equals" to-field-name="routeSegMap.shipmentRouteSegmentId"/>
+        </assert>
+        <check-errors/>
+    </simple-method>
 </simple-methods>
 
     <!-- FooBar services -->

Added: ofbiz/trunk/applications/product/testdef/ProductTest.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/testdef/ProductTest.xml?rev=642365&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/testdef/ProductTest.xml (added)
+++ ofbiz/trunk/applications/product/testdef/ProductTest.xml Fri Mar 28 13:17:57 2008
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<test-suite suite-name="producttests"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
+    
+    <!-- TODO: TO run one test case at a time comment to others -->
+    
+    <!--test-case case-name="inventoryAdjustment-test">
+        <junit-test-suite class-name="org.ofbiz.product.test.PhysicalInventoryAdjustmentTest"/>
+    </test-case-->
+    <test-case case-name="userLoginEntityXmlAssert">
+        <entity-xml action="assert" entity-xml-url="component://product/testdef/assertdata/TestUserLoginData.xml"/>
+    </test-case>
+    <test-case case-name="testReceiveShipment Direct Simple Method">
+        <simple-method-test location="component://product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml" name="testCreateShipmentRouteSegment"/>
+    </test-case>
+</test-suite>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/product/testdef/ProductTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/testdef/ProductTest.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/product/testdef/ProductTest.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/trunk/applications/product/testdef/assertdata/TestUserLoginData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/testdef/assertdata/TestUserLoginData.xml?rev=642365&view=auto
==============================================================================
--- ofbiz/trunk/applications/product/testdef/assertdata/TestUserLoginData.xml (added)
+++ ofbiz/trunk/applications/product/testdef/assertdata/TestUserLoginData.xml Fri Mar 28 13:17:57 2008
@@ -0,0 +1,24 @@
+<?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.
+-->
+<entity-engine-xml>
+    <UserLogin userLoginId="system" currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" />
+    <UserLogin userLoginId="anonymous" currentPassword="anonymous" />
+    <UserLogin userLoginId="admin" currentPassword="47ca69ebb4bdc9ae0adec130880165d2cc05db1a" partyId="admin" />
+</entity-engine-xml>
\ No newline at end of file

Propchange: ofbiz/trunk/applications/product/testdef/assertdata/TestUserLoginData.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/testdef/assertdata/TestUserLoginData.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/product/testdef/assertdata/TestUserLoginData.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml