当前位置:网站首页>A unit test report for CRM One Order Application log
A unit test report for CRM One Order Application log
2022-08-10 13:20:00 【Wang Zixi】
源代码如下:
*&---------------------------------------------------------------------*
*& Report ZDISPLAY_ORDER_LOG1
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zapplog_unittest.
CLASS lcl_test DEFINITION.
PUBLIC SECTION.
METHODS: test_all_oppt, test_created_by_jerry, test_oppt_jerry,
constructor.
PRIVATE SECTION.
METHODS: get_oppt_guid, compare, get_created_by, get_oppt_jerry.
DATA: mt_guid_tab TYPE crmt_object_guid_tab,
mt_msg_origin TYPE crmt_odata_task_logst,
mt_msg_opt LIKE mt_msg_origin,
mo_tool TYPE REF TO cl_crm_order_message_tool.
ENDCLASS.
CLASS lcl_test IMPLEMENTATION.
METHOD: test_oppt_jerry.
get_oppt_jerry( ).
compare( ).
WRITE: / 'lines of message: ' , lines( mt_msg_origin ).
WRITE: / 'test on all Opportunity with type OPPT and created by Jerry passed.' COLOR COL_NEGATIVE.
ENDMETHOD.
METHOD: test_created_by_jerry.
get_created_by( ).
compare( ).
WRITE: / 'lines of message: ' , lines( mt_msg_origin ).
WRITE: / 'test on all Opportunity created by Jerry passed.' COLOR COL_NEGATIVE.
ENDMETHOD.
METHOD: test_all_oppt.
get_oppt_guid( ).
compare( ).
WRITE: / 'lines of message: ' , lines( mt_msg_origin ).
WRITE: / 'test on all Opportunity with type OPPT passed.' COLOR COL_NEGATIVE.
ENDMETHOD.
METHOD: get_created_by.
CLEAR: mt_guid_tab.
SELECT guid INTO TABLE mt_guid_tab FROM crmd_orderadm_h WHERE created_by = 'WANGJER'.
ENDMETHOD.
METHOD: get_oppt_jerry.
CLEAR: mt_guid_tab.
SELECT guid INTO TABLE mt_guid_tab FROM crmd_orderadm_h WHERE process_type = 'OPPT' AND created_by = 'WANGJER'.
ENDMETHOD.
METHOD: get_oppt_guid.
CLEAR: mt_guid_tab.
SELECT guid INTO TABLE mt_guid_tab FROM crmd_orderadm_h WHERE process_type = 'OPPT'.
ENDMETHOD.
METHOD: compare.
CLEAR: mt_msg_origin, mt_msg_opt.
mt_msg_origin = mo_tool->get_order_error_message_opt( mt_guid_tab ).
CALL FUNCTION 'CRM_MESSAGES_INIT'
EXPORTING
it_docnumber = mt_guid_tab.
mt_msg_opt = mo_tool->get_order_error_message( mt_guid_tab ).
SORT mt_msg_origin BY header_guid log_msg.
SORT mt_msg_opt BY header_guid log_msg.
ASSERT mt_msg_origin = mt_msg_opt.
ENDMETHOD.
METHOD: constructor.
mo_tool = NEW cl_crm_order_message_tool( ).
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA: lo_test TYPE REF TO lcl_test.
lo_test = new lcl_test( ).
lo_test->test_all_oppt( ).
lo_test->test_created_by_jerry( ).
lo_test->test_oppt_jerry( ).
执行之后的效果:
边栏推荐
- Mysql—— 内连接、左连接、右连接以及全连接查询
- How to cultivate the design thinking of ui designers?
- Blast!ByteDance successfully landed, only because the interview questions of LeetCode algorithm were exhausted
- CodeForces - 834C
- Jenkins修改默认主目录
- 神经网络可视化有3D版本了,美到沦陷!(已开源)
- ArcMAP has a problem of -15 and cannot be accessed [Provide your license server administrator with the following information:Err-15]
- Loudi Sewage Treatment Plant Laboratory Construction Management
- ASP.NET Core依赖注入系统学习教程:ServiceDescriptor(服务注册描述类型)
- ABAP 里文件操作涉及到中文字符集的问题和解决方案试读版
猜你喜欢
Efficient and Robust 2D-to-BEV Representation Learning via Geometry-guided Kernel Transformer Paper Notes
瑞幸「翻身」?恐言之尚早
代码随想录笔记_动态规划_70爬楼梯
M²BEV: Multi-Camera Joint 3D Detection and Segmentation with Unified Bird’s-Eye View Representation
G1和CMS的三色标记法及漏标问题
2022 Recruitment Notice for Academician Zhao Guoping Group of Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences
10 款更先进的开源命令行工具
Solution for "Certificate not valid for requested usage" after Digicert EV certificate signing
专有云ABC Stack,真正的实力派!
Shell:数组
随机推荐
2022年8月中国数据库排行榜:openGauss重夺榜眼,PolarDB反超人大金仓
DNS欺骗-教程详解
娄底妆品实验室建设规划构思
鸿蒙开发从hello world开始
【iOS】面试整理
47Haproxy Cluster
Detailed explanation of es6-promise object
「网络架构」网络代理第一部分: 代理概述
2022 Recruitment Notice for Academician Zhao Guoping Group of Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences
LeetCode简单题之合并相似的物品
专有云ABC Stack,真正的实力派!
跨域的五种解决方案
Overview of Loudi Petrochemical Experiment Design and Construction Planning
漏洞管理计划的未来趋势
递归递推之计算组合数
Polygon zkEVM工具——PIL和CIRCOM
Basic knowledge of switches
BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection Paper Notes
Wirshark common operations and tcp three-way handshake process example analysis
C#WPF 图片在显示时没有问题,但在运行时图片显示不出来的解决