Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

    181

    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

    478

    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

    509

    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

    531

    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

    865

    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

    867

    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

    897

    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

    920

    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

    933

    Likes

    0

    Replies

    8
Sort by
  • Recently earned
  • Unearned first
  • A-Z
  • Z-A
Show more