Search in sources :

Example 1 with MockPersistenceStrategy

use of com.adobe.cq.wcm.core.components.testing.MockPersistenceStrategy in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class PageImplTest method internalSetup.

@Override
protected void internalSetup() {
    super.internalSetup();
    ClientLibrary mockClientLibrary = Mockito.mock(ClientLibrary.class);
    lenient().when(mockClientLibrary.getPath()).thenReturn("/apps/wcm/core/page/clientlibs/favicon");
    lenient().when(mockClientLibrary.allowProxy()).thenReturn(true);
    context.registerInjectActivateService(new MockHtmlLibraryManager(mockClientLibrary));
    context.registerInjectActivateService(mockProductInfoProvider);
    context.registerInjectActivateService(new MockPersistenceStrategy(), ImmutableMap.of(Constants.SERVICE_RANKING, Integer.MAX_VALUE));
}
Also used : ClientLibrary(com.adobe.granite.ui.clientlibs.ClientLibrary) MockHtmlLibraryManager(com.adobe.cq.wcm.core.components.testing.MockHtmlLibraryManager) MockPersistenceStrategy(com.adobe.cq.wcm.core.components.testing.MockPersistenceStrategy)

Aggregations

MockHtmlLibraryManager (com.adobe.cq.wcm.core.components.testing.MockHtmlLibraryManager)1 MockPersistenceStrategy (com.adobe.cq.wcm.core.components.testing.MockPersistenceStrategy)1 ClientLibrary (com.adobe.granite.ui.clientlibs.ClientLibrary)1