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
Online

Badges

Badges
9

Accepted Solutions

Accepted Solutions
0

Likes Received

Likes Received
3

Posts & Comments

Posts & Comments
9

Discussions

Discussions
0

Questions

Questions
2

Ideas

Ideas
0

Blog Posts

Blog Posts
0
Top badges earned by Dody
Customize the badges you want to showcase on your profile
AEM AS CLOUD SERVICE - @aem-upload - Adobe Experience Manager 31-10-2021
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 admin:admin -h http://localhost:4502/content/dam : folder aem-upload-1635701310972 is created but no asset is uploaded into it with following error : error: unhandled exception attempting to upload files d...

Views

121

Likes

0

Replies

0
Re: Unit Test for a service using JobManger api - Adobe Experience Manager 27-10-2021
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.

Views

234

Like

1

Replies

0
Re: Unit Test for a service using JobManger api - Adobe Experience Manager 26-10-2021
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 had nothing to do more ? No need to assertTrue.../equals.. nothing ? Thanks in advanceRegards

Views

265

Like

1

Replies

2
Unit Test for a service using JobManger api - Adobe Experience Manager 26-10-2021
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 explanations that let me understand the process. I have a service : scheduleJob. In that service i have a function scheduling a job. It will looks like :class ScheduleJob...public void startMyJob(Strin...

Views

287

Likes

0

Replies

4
Re: Mocking JobManager in junit unit TEst - Adobe Experience Manager 26-10-2021
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.

Views

380

Likes

0

Replies

0
Re: Mocking JobManager in junit unit TEst - Adobe Experience Manager 26-10-2021
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.

Views

382

Like

1

Replies

0
Re: Mocking JobManager in junit unit TEst - Adobe Experience Manager 26-10-2021
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 to construct the instance. Regards.

Views

412

Likes

0

Replies

0
Re: Mocking JobManager in junit unit TEst - Adobe Experience Manager 25-10-2021
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.

Views

435

Likes

0

Replies

0
Mocking JobManager in junit unit TEst - Adobe Experience Manager 25-10-2021
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 myCustomServiceTest.. @Mock private JobManager jobManager; .private MyCustomService myCustomService = new MyCustomService () .AemContext aemContext = new AemContext(); ..aemContext.registerService(JobManager); aemCon...

Views

448

Likes

0

Replies

8
Likes given to
Likes from