官术网_书友最值得收藏!

Testing the application

In order to test the application for the two described scenarios (orders retrieval and order creation), our console application must receive the correct defined parameter (READ, CREATE) at startup.

Let's learn how to test the application by performing the following steps:

  1. To do so, right-click on the solution name, click Properties, and then choose Debug. In the Debug window, you can specify the startup parameters:
  2. Let's test the application by passing the READ parameter as input.
  3. The application code has to retrieve all the sales orders for Customer No. = 10000 (Cannon Group SpA) and this is the situation that we have on NAV:
  4. If you place a breakpoint (by pressing F9) after the lines that calls the NAV web service, you can see the retrieved records in the Debug window:
  5. The final output on the console shows you the details for all the retrieved sales orders:
  6. Now change the application startup parameter and use CREATE in order to call the function for creating a sales order on NAV:
  7. We placed a breakpoint after the first NAV web service Create call to check the correct order initialization (NAV must give us the Order No.). While debugging (Visual Studio stops the execution at your breakpoint) select the order object on the code, right-click, and choose QuickWatch….
  8. In the QuickWatch window in Visual Studio, you can see all the object details and you can check the Order No. returned by NAV:
  9. This is the final result on NAV:
主站蜘蛛池模板: 松潘县| 宜章县| 增城市| 安西县| 武陟县| 兴安盟| 当雄县| 吴江市| 广饶县| 阿拉善左旗| 凤山县| 卢湾区| 元阳县| 广丰县| 盐亭县| 巴林左旗| 贞丰县| 平定县| 衡东县| 融水| 邯郸县| 花莲县| 上栗县| 固安县| 西青区| 布尔津县| 平安县| 始兴县| 宜丰县| 吉木萨尔县| 花垣县| 泰顺县| 双流县| 达拉特旗| 锡林浩特市| 资兴市| 织金县| 东城区| 南昌县| 瑞丽市| 谷城县|