I am trying to mock GetPage() method in custom widget. But did not fond any proper solution. Can please anyone provide solution of this problem.
Use the IPageDataContextRetriever in your code, instead of the GetPage() method. Then you can mock that interface. This might help, Developing widgets
- Accessing the data of the current page.
Thank you for reply. Currently i am working in Kentico 12, This interface(IPageDataContextRetriever) does not supported in Kentico 12. Pease suggest me mocking of getpage() method in kentico 12.
Please, sign in to be able to submit a new answer.