Expand my Community achievements bar.

Dody
Dody
Offline
  • Hello Community, I need your help on a topic. I have several locally folders containing assets that i would like to upload to my aem author instance on the cloud. I have read the documentation at : https://github.com/adobe/aem-upload. I am a little bit confused :  aio-aem aem:upload test.pdf -c admi...

    Type

    Discussions

    Views

    212

    Likes

    0

    Replies

    0
  • Hi @MohitKumarK , But here is my question, because my service method is only creating a scheduled job and nothing is returned. So i mocked everything, it's fine but i don't now what to assert. Thanks for your help. I put it as correct answer.  

    Type

    Questions

    Views

    526

    Like

    1

    Replies

    0
  • Hello @MohitKumarK , Thanks for the answer. It's more clear now. I did that and then the tests passes. So if i understood well, in my test method i am only calling my serviceMethod. @TeststartMyJob(){ scheduleJob.startMyJob(); Then if i correctly set up the right "when..thenReturn" instructions, i ...

    Type

    Questions

    Views

    557

    Like

    1

    Replies

    2
  • Hi Everybody. I opened a previous ticket : https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/mocking-jobmanager-in-junit-unit-test/td-p/429046 because i had issue on mocking annotations.  I am opening a new ticket ( related to the previous ) because i will appreciate help or ...

    Type

    Questions

    Views

    579

    Likes

    0

    Replies

    4
  • Hi @MohitKumarK , it works well now ( cf previous answer ). Thanks for your remark. I checked and everything is working fine. Thanks for your time. Regards.

    Type

    Questions

    Views

    1.1K

    Likes

    0

    Replies

    0
  • Hi @lukasz-m , Thanks for your help. I tried that yesterday and had an error so i thought it wasn't working properly. In fact the error was related to my config and as you said : aemContext.registerService(JobManager.class, jobManager); works well ! Thanks again. 

    Type

    Questions

    Views

    1.1K

    Like

    1

    Replies

    0
  • Hello @SantoshSai .Thanks for your help. I tried to change the @Mock with @InjectMock on the jobManager but it doesn't work too. :Cannot instantiate @InjectMocks field named 'jobManager'! Cause: the type 'JobManager' is an interface.You haven't provided the instance at field declaration so I tried t...

    Type

    Questions

    Views

    1.1K

    Likes

    0

    Replies

    0
  • Hi @Siva_Sogalapalli , Thanks for taking some time for me. I already saw that ticket but doesn't feel it's the same isssue. Thanks.

    Type

    Questions

    Views

    1.2K

    Likes

    0

    Replies

    0
  • Hi everybody,  Any help will be appreciated. i am trying to create a unit test for  myCustomService. This service has a reference to a JobManager. I didn't find any precise documentation to do that. Here what i do : @ExtendsWith({AemContextExtension.class,MockitoExtension.class})class myCustomServic...

    Type

    Questions

    Views

    1.2K

    Likes

    0

    Replies

    8
Top badges earned by Dody
Customize the badges you want to showcase on your profile
page footer