Package org.apache.rave.portal.service

Examples of org.apache.rave.portal.service.PortalPreferenceService


        UserService userService = createMock(UserService.class);
        expect(userService.getAuthenticatedUser()).andReturn(validUser);
        replay(userService);

        PortalPreferenceService preferenceService = createMock(PortalPreferenceService.class);
        expect(preferenceService.getPreference(PortalPreferenceKeys.PAGE_SIZE)).andReturn(null);
        replay(preferenceService);

        NewWidgetValidator widgetValidator = new NewWidgetValidator(widgetService);
        controller = new WidgetStoreController(widgetService, widgetValidator, userService, preferenceService);
    }
View Full Code Here


        UserService userService = createMock(UserService.class);
        expect(userService.getAuthenticatedUser()).andReturn(validUser);
        replay(userService);

        PortalPreferenceService preferenceService = createMock(PortalPreferenceService.class);
        expect(preferenceService.getPreference(PortalPreferenceKeys.INITIAL_WIDGET_STATUS)).andReturn(null);
        expect(preferenceService.getPreference(PortalPreferenceKeys.PAGE_SIZE)).andReturn(null);
        expect(preferenceService.getPreference(PortalPreferenceKeys.EXTERNAL_MARKETPLACE_URL)).andReturn(null);
        replay(preferenceService);

        NewWidgetValidator widgetValidator = new NewWidgetValidator(widgetService);
        controller = new WidgetStoreController(widgetService, widgetValidator, userService,
                preferenceService, tagService, categoryService);
View Full Code Here

    }

    @Test
    public void adminWidgets() throws Exception {
        Model model = new ExtendedModelMap();
        PortalPreferenceService preferenceService = createMock(PortalPreferenceService.class);
        expect(preferenceService.getPreference(PortalPreferenceKeys.PAGE_SIZE)).andReturn(null);
        replay(preferenceService);

        SearchResult<Widget> widgetSearchResult = populateWidgetSearchResult();
        expect(service.getLimitedList(DEFAULT_OFFSET, DEFAULT_PAGESIZE)).andReturn(widgetSearchResult);
        replay(service);
View Full Code Here

    public void searchWidgets() throws Exception {
        Model model = new ExtendedModelMap();
        String searchTerm = "widget";
        String type = "OpenSocial";
        String status = "published";
        PortalPreferenceService preferenceService = createMock(PortalPreferenceService.class);
        expect(preferenceService.getPreference(PortalPreferenceKeys.PAGE_SIZE)).andReturn(null);
        replay(preferenceService);

        SearchResult<Widget> widgetSearchResult = populateWidgetSearchResult();
        expect(service.getWidgetsBySearchCriteria(searchTerm, type, status, DEFAULT_OFFSET, DEFAULT_PAGESIZE)).andReturn(widgetSearchResult);
        replay(service);
View Full Code Here

    }

    @Test
    public void adminWidgets() throws Exception {
        Model model = new ExtendedModelMap();
        PortalPreferenceService preferenceService = createMock(PortalPreferenceService.class);
        expect(preferenceService.getPreference(PortalPreferenceKeys.PAGE_SIZE)).andReturn(null);
        replay(preferenceService);

        SearchResult<Widget> widgetSearchResult = populateWidgetSearchResult();
        expect(service.getLimitedListOfWidgets(DEFAULT_OFFSET, DEFAULT_PAGESIZE)).andReturn(widgetSearchResult);
        replay(service);
View Full Code Here

    public void searchWidgets() throws Exception {
        Model model = new ExtendedModelMap();
        String searchTerm = "widget";
        String type = "OpenSocial";
        String status = "published";
        PortalPreferenceService preferenceService = createMock(PortalPreferenceService.class);
        expect(preferenceService.getPreference(PortalPreferenceKeys.PAGE_SIZE)).andReturn(null);
        replay(preferenceService);

        SearchResult<Widget> widgetSearchResult = populateWidgetSearchResult();
        expect(service.getWidgetsBySearchCriteria(searchTerm, type, status, DEFAULT_OFFSET, DEFAULT_PAGESIZE)).andReturn(widgetSearchResult);
        replay(service);
View Full Code Here

        UserService userService = createMock(UserService.class);
        expect(userService.getAuthenticatedUser()).andReturn(validUser);
        replay(userService);

        PortalPreferenceService preferenceService = createMock(PortalPreferenceService.class);
        expect(preferenceService.getPreference(PortalPreferenceKeys.PAGE_SIZE)).andReturn(null);
        replay(preferenceService);

        NewWidgetValidator widgetValidator = new NewWidgetValidator(widgetService);
        controller = new WidgetStoreController(widgetService, widgetValidator, userService,
                preferenceService, tagService, categoryService);
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.service.PortalPreferenceService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.