当前位置:网站首页>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( ).
执行之后的效果:

边栏推荐
- Keithley DMM7510 accurate measurement of ultra-low power consumption equipment all kinds of operation mode power consumption
- ArcMAP出现-15的问题无法访问[Provide your license server administrator with the following information:Err-15]
- CodeForces - 834C
- 漏洞管理计划的未来趋势
- 实践为主,理论为辅!腾讯大佬MySQL高阶宝典震撼来袭!
- 娄底污水处理厂实验室建设管理
- The basic components of Loudi plant cell laboratory construction
- sprintboot项目通过interceptor和filter实现接入授权控制
- MySQL相关问题整理
- 中科院深圳先进技术院合成所赵国屏院士组2022年招聘启事
猜你喜欢

金山云要飘到哪里?

Efficient and Robust 2D-to-BEV Representation Learning via Geometry-guided Kernel Transformer Paper Notes

Merge similar items in LeetCode simple questions

10 款更先进的开源命令行工具

LeetCode中等题之搜索二维矩阵

机器学习实战(2)——端到端的机器学习项目

shell:常用小工具(sort、uniq、tr、cut)

M²BEV: Multi-Camera Joint 3D Detection and Segmentation with Unified Bird’s-Eye View Representation

es6-promise对象详解

表中存在多个索引问题? - 聚集索引,回表,覆盖索引
随机推荐
大佬们有遇到过这个问题吗? MySQL 2.2 和 2.3-SNAPSHOT 都这样,貌似是
燃炸!字节跳动成功上岸,只因刷爆LeetCode算法面试题
Loudi Sewage Treatment Plant Laboratory Construction Management
Requirements for the construction of Loudi stem cell preparation laboratory
娄底疾控中心实验室设计理念说明
瑞幸「翻身」?恐言之尚早
kubernetes介绍
Redis 定长队列的探索和实践
Codeforces Round #276 (Div. 1) B. Maximum Value
Code Casual Recording Notes_Dynamic Programming_70 Climbing Stairs
I would like to ask the big guys, how to solve this error when cdc oracle initializes a 3 million table task running
LeetCode简单题之合并相似的物品
数字藏品,“赌”字当头
「网络架构」网络代理第一部分: 代理概述
想通这点,治好 AI 打工人的精神内耗
es6-promise对象详解
M²BEV: Multi-Camera Joint 3D Detection and Segmentation with Unified Bird’s-Eye View Representation
Efficient and Robust 2D-to-BEV Representation Learning via Geometry-guided Kernel Transformer 论文笔记
22!Beijing Changping District notified catering service enterprises with food safety problems
MySQL相关问题整理