Hi @sravs, I am already using AemContext, if you look at the MyServiceTest class, it is leveraging AemContext. Please let me know if I am missing something from your suggestion. Regards,Raj
that is exactly what I looking for. How do I fix this `it is possible that the unit test environment is not properly configured or that there are differences in the environment that are causing the issue. You may need to modify your unit test to properly simulate the AEM run-time environment.`
Hi @Raja_Reddy , Thank you for your response. Can you help me understand why adding the updated() method would solve the problem? The code that I shared before works as expected in AEM run-time but does not when running the unit test. So, the solution for this problem would involve changing t...
Hi, I have an OSGi service (MyService) that is referencing a list of OSGi services implementing the same interface (SecondService). Debugging this code with AEM 6.5.17.0 is properly injecting all the OSGi services (serviceList has multiple objects), but when I try to replicate that in my unit test...
Hi, I am creating a component that requires the Page Locale to make decisions on what to display. I am able to get the Page object using @inject, but i am not sure how to Unit Test this models now. I tried creating an entire structure in unit tests json and passed it to AEMContent.currentResource...