Skip to Content

How to mock Easy Node Access class for BOPF unit testing?

Mar 30 at 08:16 AM


avatar image

Hi all,

I develop some custom BOPF-based features for EHS and use ENA framework because of it's clean and useful object structure. But because of lack of documentation I can't solve easy problems like BO's actions and validations unit testing.

I get the instance of ENA class using static factory method cl_ehfnd_ena_service_mngr=>instancev2( ). But I found no possibility to mock it for unit test out-of-the-box.

Are there some good practices to test ENA or another powerfull approaches? Maybe some kind of insider information related to ENA?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Egor Malov Apr 04 at 09:44 AM

Hi Ilya,

Maybe this recent post on BOPF testing has some information for you: How to Test BOPF Actions, Determinations and Validations Using BUnit – An Introduction to the BOPF Unit Test Framework

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Egor,

Thanks, it's very helpful. But unfortunately, framework provides a very small possibility to test BOPF stuff, for example I cannot test any cross-BO requests etc. But I wrote one unit test for default date determination with it :)