Junit for mutifield test case | Community
Skip to main content
Nandheswara
April 10, 2023
Solved

Junit for mutifield test case

  • April 10, 2023
  • 3 replies
  • 867 views

Hi all,

Can anyone suggest some Junits 5 blog for creating test case for below code

@586265 @Via("resource") @Named("multifield/.") private List<Multi> multifields; @Override public List<Multi> getMultifields() { return multifields; }

 

Thanks in Advance

Nandheswara

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Shivam153
April 10, 2023

Firstly, create a empty list of multi type, Then mock a multi object and add it in list.

Call the method appropriately.

 

 

Thanks

Shivam

Suraj_Kamdi
Community Advisor
Community Advisor
April 10, 2023

@nandheswara Create a dummy multifield json based resource using WCM AEM Context.

Saravanan_Dharmaraj
Community Advisor
Saravanan_DharmarajCommunity AdvisorAccepted solution
Community Advisor
April 10, 2023