Hi
How do i mock the getCuurentPage.. like methods. I am using Junit4Mockery.
Thanks
Abhinav
Solved! Go to Solution.
Views
Replies
Total Likes
Same way as you Mock any any interface. But, beware, you eventually will end up mocking the whole AEM (or it will feel like it).
In many cases, the Sling Test framework provides a better solution. Take a look at http://sling.apache.org/documentation/tutorials-how-tos/testing-sling-based-applications.html
"it felt safer to test it in a realistic situation rather than mock everything." - Could not agree more.
/Ove
Views
Replies
Total Likes
Same way as you Mock any any interface. But, beware, you eventually will end up mocking the whole AEM (or it will feel like it).
In many cases, the Sling Test framework provides a better solution. Take a look at http://sling.apache.org/documentation/tutorials-how-tos/testing-sling-based-applications.html
"it felt safer to test it in a realistic situation rather than mock everything." - Could not agree more.
/Ove
Views
Replies
Total Likes