SAP ABAP Unit - Chap. 3 : Create a Mock / Test Exception

preview_player
Показать описание
ABAP Unit is the solution provided by SAP to make Unitary test.
Unitary test is the possibility to test some parts of your code without running the whole code.

Here you will see how to manage dependency to another class/method. As you need to test only the responsibility of the public method of the class, you MUST not test also method of other class.
To by pass this, we will create a Mock, inject the Mock in the Constructor method.

We will see also how to test exception is raised.

The code is available in the SAP Forum:
Рекомендации по теме