Search in sources :

Example 1 with WidgetDtoBuilder

use of org.entando.entando.aps.system.services.widgettype.model.WidgetDtoBuilder in project entando-core by entando.

the class WidgetServiceTest method setUp.

@Before
public void setUp() throws Exception {
    when(pageManager.getOnlineWidgetUtilizers(WIDGET_1_CODE)).thenReturn(ImmutableList.of(new Page()));
    when(pageManager.getDraftWidgetUtilizers(WIDGET_1_CODE)).thenReturn(ImmutableList.of(new Page()));
    WidgetDtoBuilder dtoBuilder = new WidgetDtoBuilder();
    dtoBuilder.setPageManager(pageManager);
    dtoBuilder.setComponentManager(componentManager);
    dtoBuilder.setStockWidgetCodes("");
    widgetService.setDtoBuilder(dtoBuilder);
    when(widgetManager.getWidgetTypes()).thenReturn(ImmutableList.of(getWidget1(), getWidget2()));
}
Also used : WidgetDtoBuilder(org.entando.entando.aps.system.services.widgettype.model.WidgetDtoBuilder) IPage(com.agiletec.aps.system.services.page.IPage) Page(com.agiletec.aps.system.services.page.Page) Before(org.junit.Before)

Aggregations

IPage (com.agiletec.aps.system.services.page.IPage)1 Page (com.agiletec.aps.system.services.page.Page)1 WidgetDtoBuilder (org.entando.entando.aps.system.services.widgettype.model.WidgetDtoBuilder)1 Before (org.junit.Before)1