@UnitTest public class DefaultCMSAdminContentSlotServiceTest extends java.lang.Object
| Constructor and Description |
|---|
DefaultCMSAdminContentSlotServiceTest() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected java.util.List<ContentSlotForPageModel> |
generateContentSlotForPageModelMocks()
Generates a list of to content slot
relation model mocks for the page.
|
protected java.util.List<ContentSlotForTemplateModel> |
generateContentSlotForTemplateModelMocks(boolean isOverlapExpected)
Generates a list of to content slot
relation model mocks for the page template.
|
void |
setUp() |
void |
willCreateAndAssignSlotsToThePositionsNotBusyWithSharedSlots() |
void |
willReturnContentSlotsForPageAndForMasterTemplate() |
void |
willReturnCustomContentSlotsInTemplateSlotPositions() |
void |
willReturnCustomContentSlotsInTemplateSlotPositionsAndSetOverrideToTrue() |
void |
willReturnOnlyContentSlotsForPage() |
void |
willReturnPositionOfContentSlotFromPage() |
void |
willReturnPositionOfContentSlotFromPageTemplate() |
public DefaultCMSAdminContentSlotServiceTest()
protected java.util.List<ContentSlotForPageModel> generateContentSlotForPageModelMocks()
protected java.util.List<ContentSlotForTemplateModel> generateContentSlotForTemplateModelMocks(boolean isOverlapExpected)
withPositions - true if the template slots should have a position parameter to test the filtering out of custom content
slots on the pageprotected int calculateNumberExpectedContentSlotsForPage(int contentSlotsForPageCount,
int contentSlotsForTemplateCount,
boolean isOverlapExpected)
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
otherwisepublic void setUp()
public void willCreateAndAssignSlotsToThePositionsNotBusyWithSharedSlots()
public void willReturnOnlyContentSlotsForPage()
public void willReturnContentSlotsForPageAndForMasterTemplate()
public void willReturnCustomContentSlotsInTemplateSlotPositions()
public void willReturnCustomContentSlotsInTemplateSlotPositionsAndSetOverrideToTrue()
public void willReturnPositionOfContentSlotFromPage()
public void willReturnPositionOfContentSlotFromPageTemplate()
Copyright © 2018 SAP SE. All Rights Reserved.