Class DefaultCMSAdminContentSlotServiceTest
- java.lang.Object
-
- de.hybris.platform.cms2.servicelayer.services.admin.impl.DefaultCMSAdminContentSlotServiceTest
-
@UnitTest public class DefaultCMSAdminContentSlotServiceTest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DefaultCMSAdminContentSlotServiceTest()
-
Method Summary
-
-
-
Method Detail
-
generateContentSlotForPageModelMocks
protected java.util.List<ContentSlotForPageModel> generateContentSlotForPageModelMocks()
- Returns:
- the list content slot relation model mocks for the page
-
generateContentSlotForTemplateModelMocks
protected java.util.List<ContentSlotForTemplateModel> generateContentSlotForTemplateModelMocks(boolean isOverlapExpected)
- Parameters:
withPositions- true if the template slots should have a position parameter to test the filtering out of custom content slots on the page- Returns:
- the list content slot relation model mocks for the page template
-
calculateNumberExpectedContentSlotsForPage
protected int calculateNumberExpectedContentSlotsForPage(int contentSlotsForPageCount, int contentSlotsForTemplateCount, boolean isOverlapExpected)Calculates how many content slots should be returned, based on the number of content slots on the page, the template and if an overlap of slots (custom page slots replacing template slots) is expected.- Parameters:
contentSlotsForPageCount- the number of content slots on the pagecontentSlotsForTemplateCount- the number of content slots on the templateisOverlapExpected- true if there are custom content slots on the page that override the slot on the template, false otherwise- Returns:
-
setUp
public void setUp()
-
willCreateAndAssignSlotsToThePositionsNotBusyWithSharedSlots
public void willCreateAndAssignSlotsToThePositionsNotBusyWithSharedSlots()
-
willReturnOnlyContentSlotsForPage
public void willReturnOnlyContentSlotsForPage()
-
willReturnContentSlotsForPageAndForMasterTemplate
public void willReturnContentSlotsForPageAndForMasterTemplate()
-
willReturnCustomContentSlotsInTemplateSlotPositions
public void willReturnCustomContentSlotsInTemplateSlotPositions()
-
willReturnCustomContentSlotsInTemplateSlotPositionsAndSetOverrideToTrue
public void willReturnCustomContentSlotsInTemplateSlotPositionsAndSetOverrideToTrue()
-
willReturnPositionOfContentSlotFromPage
public void willReturnPositionOfContentSlotFromPage()
-
willReturnPositionOfContentSlotFromPageTemplate
public void willReturnPositionOfContentSlotFromPageTemplate()
-
shouldThrowTypePermissionExceptionWhenAddComponentToSlotAndIfSlotDoesNotHaveChangePermission
public void shouldThrowTypePermissionExceptionWhenAddComponentToSlotAndIfSlotDoesNotHaveChangePermission()
-
shouldThrowTypePermissionExceptionWhenUpdateComponentPositionInSlotAndIfSlotDoesNotHaveChangePermission
public void shouldThrowTypePermissionExceptionWhenUpdateComponentPositionInSlotAndIfSlotDoesNotHaveChangePermission()
-
shouldThrowUnknownIdentifierExceptionWhenOneOfTheRequestedContentSlotsCouldNotBeFound
public void shouldThrowUnknownIdentifierExceptionWhenOneOfTheRequestedContentSlotsCouldNotBeFound()
-
shouldThrowAmbiguousIdentifierExceptionWhenOneOfTheRequestedContentSlotsReturnedMoreThanOneResult
public void shouldThrowAmbiguousIdentifierExceptionWhenOneOfTheRequestedContentSlotsReturnedMoreThanOneResult()
-
shouldReturnTheListOfContentSlotsRetrieved
public void shouldReturnTheListOfContentSlotsRetrieved()
-
-