Développer ma barre des réalisations de la Communauté.

The first preview of our new Community upgrade is live - check it out now.
RÉSOLU

AEM Developer Certification Question - AEM Unit Testing

Avatar

Level 3
An AEM application msut implement user testing using AEM Mocks.
Which two service does the Class AemContext provide developers access to? (Choose two)

A. Session

B. FlushAgent

C. TagManager

D.WorkflowSession

E. ModelFactory
Sujets

Les sujets facilitent la catégorisation du contenu de la Communauté et vous aident à retrouver le contenu le plus pertinent.

1 solution acceptée

Avatar

Réponse correcte par
Community Advisor

Hi @S__k__Agarwal 

 

I would say TagManager and ModelFactory:

Provides various common required mock objects and helpers such as SlingHttpServletRequest objects, various mock Sling and AEM OSGi services such as ModelFactory, PageManager, Page, Template, ComponentManager, Component, TagManager, Tag, etc. 

 

Source: https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-wknd-tutorial-de...

Voir la solution dans l'envoi d'origine

3 Replies

Avatar

Réponse correcte par
Community Advisor

Hi @S__k__Agarwal 

 

I would say TagManager and ModelFactory:

Provides various common required mock objects and helpers such as SlingHttpServletRequest objects, various mock Sling and AEM OSGi services such as ModelFactory, PageManager, Page, Template, ComponentManager, Component, TagManager, Tag, etc. 

 

Source: https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-wknd-tutorial-de...

Avatar

Community Advisor

Hi @S__k__Agarwal 

AEM Mocks provides developers access to the following services:

  1. TagManager (Option C)
  2. ModelFactory (Option E)


Avatar

Community Advisor

The two services that the AemContext class provides developers access to are:
1. TagManager (C)

2. ModelFactory (E)
These services are commonly used for unit testing in AEM, providing mock objects and helpers like SlingHttpServletRequest, ModelFactory, and TagManager.