Skip to Content

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

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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

    Add comment
    10|10000 characters needed 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 :)

      Regards,

      Ilya