details: https://code.openbravo.com/erp/devel/pi/rev/eea6dae45251 changeset: 29459:eea6dae45251 user: Naroa Iriarte <naroa.iriarte <at> openbravo.com> date: Thu May 12 11:32:36 2016 +0200 summary: Related to issue 32912: The test has been improved
The test now checks the correct behavior of the Storage Bin subtab (of the Warehouse and Storage Bins window). It has now a private method which is the one that fills up the parameters map. diffstat: src-test/src/org/openbravo/test/datasource/EmptyStringWhereAndFilterClauseParameter.java | 31 +++++---- 1 files changed, 17 insertions(+), 14 deletions(-) diffs (49 lines): diff -r 4631e87e35e7 -r eea6dae45251 src-test/src/org/openbravo/test/datasource/EmptyStringWhereAndFilterClauseParameter.java --- a/src-test/src/org/openbravo/test/datasource/EmptyStringWhereAndFilterClauseParameter.java Thu May 12 13:59:40 2016 +0200 +++ b/src-test/src/org/openbravo/test/datasource/EmptyStringWhereAndFilterClauseParameter.java Thu May 12 11:32:36 2016 +0200 @@ -39,18 +39,9 @@ * */ public class EmptyStringWhereAndFilterClauseParameter extends BaseDataSourceTestDal { - private Map<String, String> params; - - public EmptyStringWhereAndFilterClauseParameter() { - params = new HashMap<String, String>(); - params.put("_targetRecordId", "17435FB915B14A93B51F3A6375B12BEE"); - params.put("_filterByParentProperty", "priceList"); - params.put("windowId", "146"); - params.put("tabId", "238"); - params.put("_operationType", "fetch"); - params.put("_startRow", "0"); - params.put("_endRow", "100"); - } + private static final String WAREHOUSE_AND_STORAGE_BIN_WINDOW_ID = "139"; + private static final String STORAGE_BIN_TAB_ID = "178"; + private static final String WAREHOUSE_LOCATOR_ID = "54EB861A446D464EAA433477A1D867A6"; @Test public void datasourceRequestStatusShouldBeSuccessful() throws Exception { @@ -60,9 +51,21 @@ is(String.valueOf(JsonConstants.RPCREQUEST_STATUS_SUCCESS))); } + private Map<String, String> fillInTheParameters() throws Exception { + Map<String, String> params = new HashMap<String, String>(); + params.put("_targetRecordId", WAREHOUSE_LOCATOR_ID); + params.put("_filterByParentProperty", "warehouse"); + params.put("windowId", WAREHOUSE_AND_STORAGE_BIN_WINDOW_ID); + params.put("tabId", STORAGE_BIN_TAB_ID); + params.put("_operationType", "fetch"); + params.put("_startRow", "0"); + params.put("_endRow", "100"); + return params; + } + private String getDataSourceResponse() throws Exception { - String response = doRequest("/org.openbravo.service.datasource/" + "PricingPriceListVersion", - params, 200, "POST"); + String response = doRequest("/org.openbravo.service.datasource/" + "Locator", + fillInTheParameters(), 200, "POST"); return response; } ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits